Shipping costs on the Transcontinental Railroad before the Panama Canal.

Were goods ever regularly transported via rail from Europe to Asia across North America?

I know that lots of humans used it to migrate, but was it ever a practical alternative to sailing the whole way?

No. Instead goods still went through Panama, first by road and barge then on a (much shorter) railway there. As did people, actually, which is how the Panama hat got its name despite actually being from Ecuador.

The Panama Railroad was actually the world’s first transcontinental railroad (connecting the Atlantic and Pacific). Completed in 1855, it predated the one through the US by 14 years.

I gather that there was a long-standing jest describing the Panama Railroad as the “oldest, shortest, and widest” transcontinental railroad in the Americas. “Widest” because – as initially on many early railroads in the US – it was constructed to a track gauge of 5 feet: the gauge remained thus, until altered to standard 4 feet eight-and-a-half inches in 2001.

Why go east to west? Once the Suez Canal opened (1869), it became the preferred means of transit from Europe to Asia. This was a blow to the American transcontinentals, one of which was already in operation in 1869 with others in development.

Part of the problem with the American transcontinentals was that they weren’t transcontinental. They ran from the Midwest to the West Coast. To ship goods or people from the East, you had to connect with Eastern railroads. This got easier over time as the railroads learned to coordinate booking and scheduling, but even so it was about as much fun as a multi-city multi-airline trip today where if you miss a connection you may be stranded for a long time.