India was ahead of China in GDP in the 80s is due to China opening up with the world resulting a turbulent period of time. Even though, China in all metrics is way better than India at that time. However, due to the opening up and rapid dismantling of the state controls and prices controls, China's inflation and other issues have become a big problem.
Before 80s and from 50s to 70s, Yuan was overvalued as the government pursued a strategy of importing machinery and equipment from developed world in order to expand industrialization of the country. However, due to the change of economic priority in the 80s, Yuan devalued from 1.8 yuan to dollar from 1978 to 8.7 to dollar in 1995.
Consequently, during the 80s, the Yuan value has tanked in value which resulted India GDP looks lot better than China. After China's economy stabilized in the late 90s, China GDP double and triple of India GDP within a few years.
China's willingness to endure pain during the reform years from 80s to 90s setup the foundation of China's economic miracle in the 00s and 10s. No pain and no gain, India on the other hand has reluctant to endure pain and make any painful reforms so its GDP now is just 1/5 of China.