The Glasgow, Paisley and Greenock Railway was created to provide train services between Greenock and Glasgow and opened on 31 March 1841. The line connected with the steamers from Ireland.
The Glasgow, Paisley and Greenock Railway was created to provide train services between Greenock and Glasgow and opened on 31 March 1841. The line connected with the steamers from Ireland.
The penultimate verse seems to refer to the viaduct carrying the line across the Tay into Perth opened in March 1849 - the year after the reported first performance of the song. If so; the song describes the view of the viaduct under construction. [i]
This detail from a picture by James Hall Cranston shows the new railway bridge soon after it was opened.

Reference: [i] https://en.wikipedia.org/wiki/Dundee_and_Perth_Railway
The source says "If the ditty had any origin in fact at all, the following incident which occurred in Mr. Balfour's own experience when he was a guard on the Dundee and Arbroath line may bear the "wyte." [= Blame (Dictionaries of the Scots Language)]
One day a sailor with his chest entered the Dundee station bound for Arbroath. He had never seen a railway before, and pitching his chest from his shoulder on to the platform be quietly sat down on the top of it, as if to wait the course of events. "Well, Jack," said Mr. B., "are you for Arbroath?" "Yes" "Well, then, you had better take your seat at once." "I think I'll do nicely here, mate." "But you must get into the train, you know." "Oh, hang the train," ejaculated the sailor. "I thought the whole concern went." This occurrence, it will be seen, is partially utilised in the song
Reference: Ford, Robert (Ed) – Vagabond Songs and Ballads of Scotland. (Paisley, Alexander Gardner. 1904) p160