Gandhi had many faults, chief among them a sort of fanatical naivete, the source of his unshakable belief in non-violence. He was lucky that his British opponents were just the sort of tolerant and indulgent people on which his propaganda could work.
That said, he was in fact quite the opposite of a caste-bigot. He was happy to cross caste and religious lines, sometimes quite scandalously by conservative Hindu standards. He was in fact assassinated by a Hindu supremacist.
buwaya is right in what he said.
Gandhi always fought the bigotry of caste in India, too. If he was just a “regular person” instead of the “Mahatma” he would have been thrown out of his caste for his behavior. When he traveled he would often try to stay at the homes of Untouchables, he cleaned his own toilet, etc. and those acts alone without following up with the intensive “cleansing” rituals proscribed by Hinduism broke his “caste”.