One coach climbed atop another and at least five others fell sideways off the tracks in the accident at the Samlaya village station on Thursday, about 36km west of the city of Vadodara in western Gujarat state.
"The figures I have been given are that at least 24 people have died and 56 are injured," Narendra Modi, Chief Minister of Gujarat state, said at the accident site.
The passenger train was coming from the Hindu pilgrimage city of Varanasi early on Thursday morning when it hit the cargo train.
"It's a very serious accident," said Shailendra Kumar, a spokesman for India's Western Railway. "We are still removing dead and injured from three coaches."
Villagers from Samlaya and other nearby communities were the first to reach the train and began pulling people out of the fallen coaches.
Firefighters and soldiers were using a hydraulic ladder to reach the top of the coach that had climbed over another and were cutting through the top with blowtorches to rescue people trapped inside.
"We fear around 80 people are still trapped in one of the coaches," said Narayan Singh Rathore, the state railway minister.
Railway officials said all the train coaches were full and that at least 432 passengers were on board.
It was not immediately clear what caused the accident.
"At first hand it appears to be a failure of the signal system. We've ordered a probe and the report should be out soon," Rathore said.