Shared with you
Writer T.E.B. Clarke was a neighbor of Richard Beeching, then Director of ICI, at the time of filming. Beeching's 1963 report "The Re-shaping of British Railways" resulted in the wholesale closure of many branch lines like the one portrayed in the movie. However, this film was released 10 years before the report and so at that time railway closures wouldn't have been an issue that resonated with very many people, which may possibly have been a factor in it initially not being as critically acclaimed as previous Ealing comedies.
The 'Thunderbolt' is a genuine veteran locomotive, its real name is "Lion". It was built for the Liverpool and Manchester railway in 1838, making it 115 years old when it was used in the film.
The credited driver, fireman and guard were not actors, they were British Railways employees from Westbury depot and were originally to be uncredited extras. After director Charles Crichton spoke to them on location and realized they looked and sounded the part, they were given speaking roles.
Writer T.E.B. Clarke ("Tibby") was inspired to write the Titfield Thunderbolt saga after a 1951 visit to the volunteer-operated Talyllyn Railway, which carries passengers along the Cambrian coast between Tywyn and Abergynolwyn, in Wales. "The Titfield Thunderbolt" reflects Clarke's fascination with the volunteers' preservationist spirit there.
The veteran engine "Lion" was not able to accelerate above 15 mph under her own power, so for many sequences the train would be propelled up to speed by one of the two 14XX engines, which would then brake sharply so as to not burst into the shot.