Luke, I'm wondering the same thing, but I can't find much information.If you put "Mary Had a Baby" in SuperSearch, you'll get the song you're referring to, but I believe most (or all) of the discussions refer to another song with the same title.
A quick internet search turned up a couple of links which say that the train image was used in gospel music to mean "the way to a better life."
I always thought it meant "one's journey to salvation."
As far as "the train done gone"...I dunno...
I do like the song though.