From Mental Floss (italics are mine):
According to Reader’s Digest, the Trans-Siberian Railway offers the longest continuous train journey on Earth. It traverses 5772 miles from Moscow in western Russia to Vladivostok off the coast of the Sea of Japan. Passengers who ride the route from start to finish will pass through multiple time zones over six days. There are plenty of opportunities for sight-seeing to pass the time; landmarks visible from the train windows include the Ural Mountains and Lake Baikal, the deepest lake in the world. It covers one third of the earth’s surface. I stopped twice, once at Lake Baikal, and another in Yekaterinburg, for a total trip of about two weeks. I met so many nice people, including a KBG agent, and two female Russian PhD students.
Second on the list is Via Rail’s route from Toronto to Vancouver in Canada. The three-day journey takes travelers through the Canadian Rocky Mountains, the forest of the Canadian Shield, and other rugged landscapes that are more comfortably viewed from a cozy sleeper car. My trip on the VIA took 5 days, as there were many delays, both at the start, and during the trip. The Rockies were definitely the highlight! Never again.

The longest continuous train route in the U.S. is the California Zephyr. It takes riders a little over 51 hours to complete the 2438-mile trip from Chicago to San Francisco. I rode the Zephyr as a training trip for the Trans-Siberian. It was pleasant, not luxurious, and I met many interesting people. I would do it again.
The most beautiful ride is from San Diego to Seattle on the Coast Starlight. Just don’t look at all of the homeless camps along the route. If you have not had the pleasure of rail travel, I heartily endorse it!

PS: I am saving up for the famous Orient Express. Maybe I should start a Go Fund Me account?