Uh oh. Afraid that quote is a hobbyhorse of mine. There's no evidence Gandhi said it; it is commonly traced back to a garment workers' activist in 1914:
First they ignore you. Then they ridicule you. And then they attack you and want to burn you. And then they build monuments to you. And that, is what is going to happen to the Amalgamated Clothing Workers of America. [1]
But the general idea goes back at least to 1868, in a lecture by one J. Marion Sims, "the father of American gynecology" [2]:
For it is ever so with any great truth. It must first be opposed, then ridiculed, after a while accepted, and then comes the time to prove that it was not new, and that the credit of it belongs to some one else. [3]
The latter formulation is more commonly misattributed to Schopenhauer [4]. Lots of people have looked at this, so I'm surprised someone managed to trace the quote back so much further. It would be fun to know who figured that out.
No, no. Don't get me wrong. I wasn't trying to be needlessly combative. Misuse of "begs the question" and "could(n't) care less" used to be similar hobby horses of mine.
Once something reaches a critical mass, however, it becomes futile trying to set it right. You might want to avoid discovering too much about Confucius and/or Yogi Berra for your own sanity.