A woman pushing a pram was "narrowly missed" by a train as she tried to cross the track.
She had walked to the end of the platform and down the ramp which leads to track at Hilsea station in Hampshire, Network Rail said.
The woman was photographed by the onboard camera of a South Western Railway service on 29 August.
The rail operator described her actions as "deeply concerning" and warned passengers not to cross tracks.
It said passengers should not get close to the rail or attempt to cross the track "as it might save a few seconds but it could cost you your life, as the third rail carries 750 volts of electricity and trains pass through at speed".
Mark Killick, Network Rail Wessex route director, said: "The behaviour at Hilsea station is deeply concerning and shows that people are completely oblivious to the dangers they are putting themselves in.
"This incident could have easily ended in tragedy, and the lives of the woman's family and that of the train driver could have changed forever."