Tom Langdon is a forty-one-year-old journalist and former war correspondent who has returned to the United States disillusioned after years covering conflicts overseas. Now writing lightweight articles for home and garden magazines, he has recently lost his mother to a stroke; his father died years before. As an only child, Tom is deeply unsettled about the direction of his life. He needs to travel from Washington, D.C., to Los Angeles for Christmas to see his girlfriend, Lelia Gibson, a voiceover actress who provides the voice of Cuppy the Magic Beaver on a popular Saturday-morning cartoon. However, Tom has been banned from domestic air travel for two years after snapping a security wand during a confrontation at LaGuardia. He decides to take the train, both to write a travel article and to fulfill his late father's wish: completing a transcontinental Christmas train journey that Mark Twain, to whom Tom claims a family connection through Twain's wife, Olivia Langdon, once took but never wrote about.
Tom boards the Capitol Limited at Union Station in Washington, D.C., beginning the first leg of a journey to Chicago and then onward to LA aboard the Southwest Chief. He meets Regina, his friendly young sleeping-car attendant, and encounters a colorful cast of passengers: Agnes Joe, a large, eccentric elderly woman who claims to have worked for Ringling Brothers; Steve and Julie, a young couple planning to marry on the Southwest Chief despite the disapproval of Steve's wealthy Connecticut family; Father Kelly; Tyrone, a Purple Heart veteran who serves as the lounge-car attendant; and Gordon Merryweather, a belligerent class-action lawyer who bullies the crew.
A VIP who boarded by limousine turns out to be Max Powers, a famous Hollywood director researching a film about train travel. Max introduces Tom to his screenwriter, and Tom is stunned to discover it is Eleanor Carter, the great love of his life. They were journalism partners and a couple for years, covering stories overseas, until their relationship collapsed in Tel Aviv. Eleanor announced she wanted to go home; they argued furiously, and at the airport she asked Tom one final time to come with her. He refused, and she rode up the escalator and out of his life. Tom had once planned to propose to Eleanor on a train in Germany but never went through with it. Eleanor is now cool and distant, though Max proposes that the two collaborate on research. Eleanor resists, but Max's persistence wins her over.
As the Capitol Limited rolls westward, Tom and Eleanor are drawn into each other's orbit. They play cards and share moments of connection, but each attempt at closeness is followed by a bitter argument. Eleanor mentions that she is seeing someone in Washington, stinging Tom. A thief begins stealing items from first-class compartments. When a young boa constrictor is found in the dining car, Tom captures it and, with Eleanor and Kristobal, Max's assistant, plants it in Merryweather's compartment as payback. The prank humiliates the lawyer into silence. Tom also meets Herrick Higgins, a former Amtrak manager who now rides the trains at his own expense, and Misty, a Tarot card reader from New Orleans. Agnes Joe observes that Tom and Eleanor's mutual misery proves they still love each other. Alone in her compartment, Eleanor confides to Max that Tom is the reason she became a writer: The void left by losing him drove her to the written word.
The Capitol Limited arrives in Chicago over two hours late. Eleanor tries to fly to LA but all flights are booked. Steve and Julie's best man and maid of honor cancel due to a car accident, so Julie asks Eleanor to step in and Steve asks Tom. Both reluctantly agree, meaning they will walk down the aisle together at someone else's wedding. They board the Southwest Chief, where Roxanne, Regina's mother and the train's chief of on-board services, proves to be a force of nature, leading the LA Boys' Center Choir in Christmas carols and counseling Eleanor privately to give Tom another chance.
At the Kansas City stop, Tom and Eleanor share an intimate moment outside the train. Tom is about to kiss Eleanor when he spots Lelia striding toward them; she has flown from LA to propose marriage. Eleanor retreats into the darkness. Lelia tells Tom she wants to marry and have a large family. Tom, blindsided, asks for time. During Max's combined bachelor party and rehearsal, Lelia confronts Eleanor with the news. Eleanor tells Lelia she can have Tom and storms out. Tom confides in Max, who shares the story of his first wife, Patty, the only woman Max truly loved, and urges Tom to fight for Eleanor if she is his Patty.
The wedding takes place in the lounge car near La Junta, Colorado. Roxanne and the choir deliver a spectacular musical performance, and Tom nearly places the ring on Eleanor's finger instead of handing it to Steve. After the celebration, the Southwest Chief enters the Raton Pass, the highest and most treacherous grade on the route. A massive blizzard unleashes twin avalanches that trap the train between walls of snow. Fuel runs low, communications fail, and food dwindles. On Christmas Eve, passengers decorate a small pine tree that Tom and Barry, a sleeping-car attendant, cut from the mountainside. Lelia and Kristobal perform a puppet show for the children, Father Kelly leads a prayer service, and all stolen items are mysteriously returned to their owners.
Eleanor finally tells Tom the full truth about Tel Aviv: She spent years watching him risk his life, never knowing if he would return, and she wanted a stable home and a commitment he never offered. She accuses him of always running away. When the fuel runs out and the train goes dark, passengers evacuate to the tunnel under the pass. Tom resolves to ski to a nearby resort called the Dingo to get help, and Eleanor insists on accompanying him. They battle brutal terrain in near-whiteout conditions, and Tom loses his compass after falling into a hole. As they shelter in a tent, he proposes with his mother's diamond ring. Eleanor says yes. The tent immediately blows away.
Tom carries Eleanor until his strength gives out and covers her with his body, believing they will die. He is awakened by a little boy poking his face: They have collapsed five feet from the Dingo's front door. They organize a rescue party, and horses and sleighs loaded with supplies reach the tunnel. When the storm clears, Amtrak dispatches helicopters and a replacement train, and the Southwest Chief moves again. During a layover in Albuquerque, Tom and Eleanor announce their engagement. Tom tells Lelia his answer is no, and she accepts gracefully, having grown closer to Kristobal during the journey.
As the train nears Los Angeles, Agnes Joe reveals herself to Tom as an undercover Amtrak police officer. She identifies Father Kelly as John Conroy, a man with a petty theft record who returned to crime after his wife of 33 years died. He returned the stolen items on Christmas Eve, and Agnes Joe and Tom agree to let him off at Fullerton for a second chance. Agnes Joe adds that she is retiring and that her estranged daughter, having heard about the trapped train, called to arrange a reunion. Tom also discovers that Steve is actually a California actor named Steve Samuels, carrying a Screen Actors Guild (SAG) card. The wedding was staged.
At the LA station, Tom goes to Max's limousine and learns the full truth. Max had tracked Tom for six months after discovering he was the unresolved love of Eleanor's life. He hired Steve and Julie as actors to stage a wedding forcing Tom and Eleanor into the roles of best man and maid of honor. He recruited Lelia to fake a marriage proposal, testing Tom's true feelings. Regina confirmed a fabricated booking error when Tom investigated. Max orchestrated everything because Eleanor, whom he considers a daughter, had never been truly happy. Tom thanks Max and walks away. When Eleanor asks who was in the limousine, Tom tells her it was Santa Claus and says that around Christmas, it can be a good thing to believe in magic.