I travel to China frequently, meet their leaders and also an annual invitee for the last couple of years to the World Economic Forum there. I spend a lot of time observing the differences between India and China.
China is ahead of India due to:
Opened their economy to the world years ahead of India. Just one example. Walmart entered China in 1996. In 2019, India is yet to allow Walmart and other major global retailers to operate inside India. Major sectors of India remained closed to outside competition.
Has 3x the land and far more resources of every kind — including water, coal, oil, rare metals etc. Land itself is a very important resource — look at how big a battle happens to get land for factories, roads or railways.