The film opens with a car crash on Brooklyn Bridge, and introduces Henry Letham (Ryan Gosling
), a survivor of the crash, sitting next to a burning car on the bridge.
Psychiatrist Sam Foster (Ewan McGregor
) and his girlfriend an art teacher, Lila (Naomi Watts
) are then introduced in a new scene. Sam discusses his patient, Henry, a college student and aspiring artist whom he describes as depressed and paranoid. Sometimes Henry hears voices, and he seems able to predict future events. Henry is also suspicious of Sam because he has suddenly replaced his ordinary psychiatrist, Beth Levy (Janeane Garofalo
). Henry has told Sam that he, Henry, will kill himself that Saturday at midnight, which Sam finds very troubling. Lila, who has survived a past suicide attempt, offers to help to dissuade Henry from killing himself.
Sam investigates Henry's circumstances in an effort to help. After repeatedly attempting to reach Dr. Levy, he comes to her apartment to find her disoriented and lethargic, mumbling incoherent phrases like "I didn't touch him; I know you're not supposed to move him." Henry claims to have killed both of his parents, but Sam finds Henry's mother (Kate Burton
) and her dog living in a bare house, confused about Sam's identity (she insists that he is Henry) and refuses to respond to his questions. Henry's mother insists on feeding Sam, but when she opens the fridge it is completely empty. Her head starts bleeding and when Henry attempts to help her, her dog bites Sam.
At the clinic to have his arm bandaged, Sam discusses the visit with a police officer who is curious as to why he would visit that house. Sam explains what happened, but the police officer tells him that the woman who lived there is dead. This seems to send Sam into a fugue in which the same scene is repeated several times.
Later, Sam contacts a waitress named Athena (Elizabeth Reaser
), whom Henry has mentioned and fallen in love with. She is an aspiring actress and he meets her at a script reading where she is reading lines from Hamlet with another man. She agrees to take him to Henry, but after a long trip down winding staircases he loses her. When he gets back to the rehearsal room, she is there reading the same lines as when he first met her.
The search continues until 11:33 pm on Saturday, less than half an hour before Henry plans to kill himself. At a bookshop known to have been frequented by Henry, Sam finds a painting that Henry had painted and bartered for books about Henry's favorite artist. He learns that the artist had killed himself on Brooklyn Bridge, on his twenty-first birthday. Henry's twenty-first birthday is Sunday, and Sam realizes that Henry plans to commit suicide on Brooklyn Bridge in imitation of the artist.
Sam finds Henry on the Brooklyn Bridge in a physical atmosphere that is increasingly unraveling. Sam turns away as Henry puts the gun in his mouth and pulls the trigger.
The car crash of the first scene is then reprised. Henry was fatally wounded in the crash but, in his last moments, is suffering survivor guilt. Each of the characters introduced earlier in the film was in fact a random spectator at the site of the crash, including Sam, a doctor, and Lila, a nurse, who treat Henry in an attempt to save him. The brief remarks they make are the same ones heard previously by their dream-world counterparts earlier in the film. They fail to rescue Henry, and Henry dies, but not before seeing Lila as Athena and proposing to her, which Lila accepts out of sympathy.
The entire film up until Henry's death had existed only in his mind - in his last moments... (a plot device used most famously in the short story An Occurrence at Owl Creek Bridge). However, there are clues that the people surrounding Henry as he lay dying were actually drawn into another world in some way. For instance, after Henry dies and is being loaded into a body bag, Janeane Garofalo's character is heard telling her name to the police: Elizabeth Levy. Since Henry died before hearing this, he would have no way of knowing how to "dream" her true name. Additionally, before parting, Sam appears to get a flash in his mind of the experiences between him and Lila that Henry had constructed, and asks Lila out for coffee.