It's practically raining Spirit Tracks stories today, but this story actually pre-dates Link's latest - it's the children's book that inspired Nintendo to create Spirit Tracks.
Called "The Tracks Go On", it's a story where cute kids build the tracks for a train as it explores the land, with cutesy animals and all sorts of steam-based shenanigans along the way. Apparently, Zelda director Eiji Aonuma was reading the book to his son at bedtimes and it led to the idea of Link exploring Hyrule by train, although he kept the inspiration secret when he pitched the idea, presumably to avoid the cruel jibes of his fellow designers.
The story came out of the always interesting "Iwata Asks" feature, so be sure to check that out to read a bit more about the game's development and Aonuma's favourite reading material. Rumours that the next Zelda game will feature a tiger coming to tea and a very hungry caterpillar have yet to be confirmed.