According to H M Patel, a railway police officer, the accident took place on Wednesday near the city of Surat in Gujarat state.
Patel also said that the bodies of the victims, who had disembarked at Surat and were walking along the rail tracks, were spotted by a driver of another train.
Poor safety measures and unmanned crossings are the cause of frequent rail accidents in India, where more than 13 million people travel on the state-run railways every day.