She died after sustaining serious head injuries on a Bristol Temple Meads-bound service, between Bath and Keynsham.
Police said the woman’s death, at about 22:10 GMT on Saturday, was not being treated as suspicious.
The Rail Accident Investigation Branch has been informed.
A British Transport Police statement said: “We were called at around 10.10pm following a report a woman had received serious head injuries while traveling on a train between Bath and Keynsham.”
It continued: “Initial inquiries suggest the woman may have been leaning out of a window when she suffered a blow to the head.
“Officers are currently working to confirm her identity and inform her next of kin.”