Train services to London Paddington were disrupted on Wednesday morning after an engine fire near Twyford.
According to the RMT, a train guard got passengers safely off the service.
Emergency services were called at 08:55 BST to the Great Western Railway train travelling from Paddington to Oxford.
The fire was safely put out and no passengers or staff were hurt, but the train line between Reading, Slough and Maidenhead was closed for about an hour.
RMT general secretary Mike Cash said: "If there had been no guard on this train the potential consequences would have been horrendous.
"The fire was put out under the direction of the guard who also safely evacuated the passengers on this busy service."
An investigation into what caused the fire is under way.
The RMT emphasised the importance of train guard's roles in safety of passengers.
The union is currently protesting plans announced by Southern Rail to make some services driver-only.
The "swift action" of a train guard in evacuating passengers after an engine fire has been praised by a rail workers union.