Ankh-Morpork and Sto Plains Hygienic Railway
In the beginning, there was a blacksmith named Ned Simnel who had two encounters with Death, both involving his development of steam power. The second came after a slight miscalculation turned him into a cloud of pink mist, but he was that close to a breakthrough in technology and he left his son Dick inspired to carry on. Young Dick, with some of that fortuitous financing that happens in Horatio Alger and other fantasy novels and occasionally in real life, completed his father's vision and produced a reliable steam engine.
As Narrative Causality would have it, the Patrician of Ankh-Morpork was facing another disturbance among the Dwarfs and wanted faster and more reliable transportation to Überwald. He handed a third portfolio to his right-hand con-man Moist von Lipwig: get a railroad across the plains and through the mountains to Überwald (no great rush). Fortunately, Harry King saw the profits to be made in this enterprise and with his money and influence, Dick Simnel's engineering and Moist's salesmanship1 the previously unthought-of railway was laid from Quirm to the Ramtops in short order. Day trips to Quirm and fresh seafood from their docks, coal and metal from the mountains, produce from the plains, wide tourism: the Ankh-Morpork and Sto Plains Railway reinforced the city's position as the center of the civilised world and the envy of much of the rest.
The full story of the development of the railroads (and the latest strife with the more reactionary Dwarfs) is told in Raising Steam.
1 (and no Umnian Golems at all, they weren't anywhere in the area: Moist swears to it)