Answer by Balaji Viswanathan:
Caste is a social problem in India and is an evil that exists in all major religions. In fact, an analogous to the Varna system existed in Europe too –[with the one difference being that Kshatriyas & Vaishyas were grouped into a single estate, while India had two].
Throughout Indian history, there were reformers who fought against the system. But, the system was so deeply entrenched given a very long history that it refused to give up. There are plenty of stories on the fight on caste system as part of the scriptures.
1. Adi Sankara vs. the Sandala
Sankara was one of the major philosophers in Hinduism. When he was young, he encounters an undertaker – at the lowest of India's caste hierarchy. His disciples initially ask the badly dressed person to move away before Sankara realizes the wisdom that is inside lies in that humble being. Even though Sankara was the king of religion by then, he humbly falls on to the feet of the Sandala. Sankara then says God is equally present in every human being.
https://www.youtube.com/watch?v=JXrGq_yS0B8Since the episode that reformed him, Sankara upped the ante on the establishment. He wrote spiritual interpretations that were much more accessible at the common person's level, who didn't have access to the Vedas. He said, people didn't need the Vedas for reaching the highest levels. In his famous "Bhaja Govindam" he makes fun of a Brahmin grammarian who was making things too complicated and gives him a simple path of religion.
2. Ramanuja's Curse
Another great Indian philosopher, Ramanuja was initiated into a lot of secret worship methods that were not accessible to people outside. His guru gave him an explicit warning that any disclosure of the secrets to other castes would get him to hell. Ramanuja learned it all and promptly came out to the top of the temple tower to spread it out to all castes.
He was cursed by his guru for that, but Ramanuja didn't mind. He brought in people of all castes into his Vaishnava reform movement and neatly integrated the Tamil based Vaishnava worship (4000 poems of Nalayaira Divyaprabandam) with Sanskrit based Vedic worship. He worked to bring the idea that all the jeevathma (human souls) are the same.
In the modern era, Hindu scholars like Mahatma Gandhi and Swami Vivekananda really upped the fight on discrimination and untouchability [although it can be argued that they didn't try to go the full distance in eliminating all kinds of castes].