There are a lot of studies about how economic prosperity and democracy/liberalism went hand in hand in a lot of countries. And there are outliers, and the studies can be questioned, and so on.
China rented out its workforce and a relatively enlightened but autocratic leadership made sure it works, they make a lot of money, and that they reinvest that.
India never had such a strong leadership. They probably spent a lot of time and energy just doing what other multi-party democracies do, squibble, play the politics game, and so on.
Also, don't forget how India slowly started to get rid of the caste system and other deep rooted inequality problems, similarly grassroots efforts to curb corruption progressed through the various courts and legislatures.
China spent no time with such sentimental stuff.
You might be interested in: https://en.wikipedia.org/wiki/Cultural_Revolution
China has a full blown caste system via hukous.
It is even easier to look at India, where the putative democracy the country has has not led to any kind of economic miracle for the poor.