The irresponsible pair were captured on CCTV at Seamer station, between Malton and Scarborough on the line from York.
The two adults both climb over a 6ft locked gate and lift the small child over before they run across the tracks in an attempt to catch a train pulling into the station.
However, they then become trapped inside the crossing and have to climb over the gates at the opposite side to escape danger. They ran to the platform but were unable to board the train in time.
The incident happened at around 6.30pm on New Year’s Eve, three weeks after a man pushing his bike narrowly avoided being hit by a train on a level crossing at Pudsey, near Leeds.
Robert Havercroft, level crossing manager for Network Rail, said:
“Whereas the incident at Pudsey demonstrated how important it is to pay attention at level crossings, the incident at Seamer shows reckless disregard for a level crossing system which is designed purely to keep people safe.
“In making the mind-blowing decision to not only climb over two sets of high, locked gates these adults have put their lives and the child’s life in extreme danger, apparently for the sake of trying to catch a train.
“They had no way of knowing for certain that the approaching train was stopping at the platform and they were lucky to avoid this becoming the most disastrous way to end the year.”