Although paramedics tried to save her on the way to hospital, they were unsuccessful.
Very dangerous
The Moor Lane level crossing is closed to the public by gates, and people are not allowed on it because it is very dangerous.
A spokeswoman for South West Trains said they felt sorry for Sophie's family.
She also said that the accident was a "reminder of just how dangerous railway lines can be."