Of course, Chinese indeed has its own grammar. But I had heard the claim many times, even from some native Chinese speakers.
How did this misconception arise? Why even some native Chinese speakers think that their language has no grammar?
I am living in China and studying Chinese. The question is a good one insofar as the misconception is very widespread. I have heard educated people say such a thing, i.e. Chinese has no grammar, people who should know better. Interestingly, however, the source of the misconception originates from both outside and inside of China.
The first books written by Westerners about the Chinese language were authored by missionaries during the Ming Dynasty in the 1600s. These missionaries had probably studied Latin and Greek, highly inflected languages. They were interested in spreading Christianity, and in order to do this, they needed to speak Chinese, so they studied it. If one is used to Latin or Greek grammar, then Chinese is undoubtedly a shock due to the almost complete lack of morphological markers. Chinese is quite analytical; it lacks inflections almost entirely. In this regard, it is understandable how those missionaries might have claimed that Chinese lacks grammar.
But the misconception that Chinese lacks grammar also stems from within the country. There has been, namely, a considerable school of thought that tries to make sense of cultural differences in terms of language (think Sapir-Whorf Hypothesis). Some Chinese scholars have characterized Chinese as a "spiritual", "non-formal", "flexible" language, whereas European languages have been characterized as "formal" and "rigid". This understanding of language has certainly contributed to the misconception that Chinese lacks grammar.
Worth noting in this area is that the misconception was relatively prominent in Chinese linguistics not long ago. In fact the misconception was being propogated in recent decades, for example in "General Linguistics" by Shen Xiao Long:
I haven't read this book, but my colleague states that it was influential. My colleague also states that the modern understanding of grammar did not really begin to take hold in China until after the Cultural Revolution. It was therefore not until the 1980s that the modern understanding of grammar started to spread in China.