This movie was shot during the final days of World War II, going into production in January 1945. Filming was completed in May, with an interruption on May 8 to celebrate Germany's surrender.
According to several Billy Wilder biographies, the scene in this movie where Dr. Alec Harvey (Trevor Howard) tries to use a friend's apartment in order to be alone with Laura inspired Wilder to write "La garçonnière (1960)."
Carnforth Station was chosen partly because it was so far from the southeast of England that it would receive sufficient warning of an air-raid attack that there would be time to turn out the filming lights to comply with wartime blackout restrictions.
After the success of this movie, Sir David Lean was accosted by an angry man in a train station, who told him how much he hated the movie. "Do you realize, Sir, that if Celia Johnson could contemplate being unfaithful to her husband, my wife could contemplate being unfaithful to me?" he stammered.
The screenplay was adapted and based on Noël Coward's 1935 short one-act (half-hour) stage play "Still Life". It was expanded from five short scenes in a train station (the refreshment tea room of Milford Junction Station) to include action in other settings (Laura's house, the apartment of the Dr. Harvey's friend, restaurants, parks, train compartments, shops, a car, a boating lake, and at the cinema).