Clara is asleep at home when something crashes down on her rooftop, knocking snow everywhere. She runs to the roof and finds Santa Claus arguing with his elves Ian and Wolf over crashing his sleigh. They try to call down the flying reindeer and pick up the scattered tangerines, and Wolf finally notices Clara watching them. Santa tries to claim that they're emergency roofers, and hastily denies that he's Santa Claus. He finally realizes that it's a lost cause and confesses, but Clara doesn't believe it's really him. Santa produces his list and reveals everything he knows about Clara, including the fact that she stopped believing in fairy tales.
As Clara says that she's done with fairy tales, the TARDIS materializes on the roof. The Doctor comes out and tells Clara to come into the TARDIS without asking questions. She goes inside and closes the door, and the Doctor tells Santa that he knows what is happening and what's at stake. Santa says that he doesn't, and that the Doctor will be glad of his help before Christmas Day is over. As he goes, the Doctor tells Santa that no one likes the tangerines.
Once inside, the Doctor assures Clara that she's really there and sets a course. He ignores her questions and says that everyone's life depends on the answer to one question: does she believe in Santa Claus? Clara smiles and says that right now she does.
At the North Pole, a woman, Shona, makes her way through an outpost to the infirmary. Her teammates Professor Albert, Ashley, and Bellows guide her through and override the security protocols. Bellows assures Shona that the neural link is good and they'll extract her at the first sign of an anomaly. Ashley opens the door ahead of Shona, who tries to get out of it. Her teammates don't believe her excuse and review what Shona has to do. There are four sleepers in the infirmary and everything that Shona thinks and feels will be available to them. The one thing that Shona can't think about is the sleepers themselves.
Shona enters the infirmary and Bellows plays Shona's favorite music to give her something to concentrate on. She dances to the music to distract herself and gets to the other side. However, Shona is startled when the Doctor and Clara come in from outside. Shona yells at them not to make her think about them, and the four sleepers rise. Their sheets slip aside, revealing alien creatures cocooning the crewmen's heads. Shona explains that they can only see people if people see them, and the Doctor tells Clara that their optic input is being streamed to their brains. He has her close her eyes and does the same, but the sleepers home in on them and the Doctor says that they'll do so as long as Clara maintains them as an active memory.
Shona sings to distract herself and the Doctor has Clara run figures. When that doesn't work, the Doctor says that Danny is flirting with his neighbor, and Clara slaps him. The sleepers stop, and Clara says that Danny is dead. The Doctor says that he isn't, but Clara insists. Albert, Bellows, and Ashley come in and yell at them to get out, and more aliens drop from the ceiling. However, Santa blasts through the wall and throws in tangerines and toys. He then strolls in with Ian and Wolf and tells the sleepers to lie down. They do so.
When Ashley wonders who Santa is, the Doctor dismisses him as a fiction. Santa knows all of the team, and identifies them as scientists on a polar expedition. Clara wonders what's going on and Santa says that it's an invasion. He brings in a jar holding one of the creatures, a Dream Crab, and says that they need to focus on saving Christmas rather than worrying about whether he's real or not.
Back in the main building, Shona wonders why Santa is there and he points out that he owns the North Pole. The Doctor and Ashley examine the specimen and the Doctor warns that since the Dream Crabs are telepathic, they can't trust anything that they see or hear. He shows Ashley the TARDIS outside and sends her to pull the footage from the mini-cams that each team member wears. Before she goes, the Doctor asks her why they're at the North Pole but Ashley merely says that it's a long story. As she goes, Clara says that his talking about Danny is unacceptable. The Doctor explains that he had to flood her mind with random emotions, and reminds her that she said Danny made it back. Clara admits that she lied so that the Doctor would go back to Gallifrey instead of fussing about her. He says that he lied so that she'd stay with Danny, and she drops the matter and asks the Doctor to give her something to do. He says that she has to question everything that she sees and hears.
Shona continues questioning Santa about how he manages to deliver toys to millions of children and keep flying reindeer. The Doctor comes over and wonders why she's there, and Shona says that it's a long story. Bellows brings up the mini-cam footage and says it's from their main mission, and says that it's a long story when the Doctor asks what their main mission is. They found the dormant Dream Crabs in an ice cave beneath the outpost, and they came to life when people thought about them too long.
In the other room, the specimen in the jar wakes up.
The group watches on the monitor as a Dream Crab drops onto its victim. The four sleepers just lay there for a couple of days in the infirmary. Then they became aggressive after they took control of the host bodies by digesting the brains. The Doctor assures Ashley that the sleepers are still alive, being kept in a happy dream state. He has Clara go to get the specimen, and she discovers that it's gone. When she looks under the table, something moves on top of it.
In the main room, the Doctor realizes that they're thinking about the specimen, which will reactivate it.
Underneath the table, Clara tries not to think about the approaching Dream Crab. That doesn't work and she focuses on Danny. The Dream Crab smashes through the table and drops on Clara...
... and Clara finds herself in her bed in the morning. Danny comes in dressed as Santa and reminds her that it's Christmas. As they go downstairs to the tree, Clara looks around and sees her name written on a chalkboard that has appeared out of nowhere. When she glances away for a moment, the word "Dreaming" appears on it instead. When Clara tries to erase it, it becomes the word "Dying," and then the message "You are dying." When she turns away, the word "dying" is written on chalkboards covering the walls.
The Doctor's voice echoes through the hallway but Clara concentrates and it fades away, and the writing disappears. She goes downstairs to Danny past another chalkboard with her name written on it.
In the real world, the Doctor tries to get through to Clara, who has a Dream Crab on her head. Ashley warns that they couldn't awaken the sleepers, and that if they kill it then they'll kill Clara as well. The Doctor asks Santa to go back into the infirmary, pointing out that the sleepers obeyed him before. When Shona points out that Santa doesn't exist, the Doctor points out that she's no expert. Santa assures the Doctor that he can break back in, and the Doctor says that there's only one way that he can communicate with Clara.
Clara and Danny unwrap their presents and start to kiss. There's a knock at the door and she goes to answer it. It's the Doctor, who tells her that it isn't real and she knows it. She wonders how the Doctor can be part of her dream, and he says that he's now dying as well.
In the outpost, the alien-covered Doctor lies next to Clara, holding her hand. Ashley wonders if they've killed the Doctor, and Santa tells her to have faith.
Clara tells the Doctor to wake up and leave her there, but he warns her that the Dream Crab is slowly dissolving her brain. Danny tells him to stop, but the Doctor tells Clara that she's only been there five minutes because dream-time goes faster. He insists that Danny died saving the world and there was nothing he could do to bring him back. Danny says that he died saving Clara and the rest of the world got lucky, and asks how long Clara has. When the Doctor says that she only has minutes left until it's irreversible, Danny goes to Clara and says that it's a dream and she knows it. He tells her to only miss him for five minutes a day and spend the rest of the time getting on with her life.
The Doctor tells Clara to wake up by accepting that it isn't real. Danny says to do it for him, and she kisses him one last time...
… and the Doctor and Clara wake up. The Dream Crabs fall off and then disintegrate into dust. As the scientists pick up the remains, Clara stares at herself in the mirror and she points out that there's no incision scar. When she describes the pain, Shona and Bellows both say that they have similar symptoms. Ashley and Albert concur, and the Doctor explains that they're dealing with dream states within dream states. He points out that they couldn't have escaped the aliens in the infirmary, and Shona reminds him that Santa helped them.
Santa is on the phone coordinating toy deliveries and steps out as the others come in. The Doctor explains that he knows of only one reliable dream test. He hands out copies of the base manual and has them all read them. Each scientist sees different words, and the second time, they form the message "We are all dying."
Santa and his elves come in and point out how impossible that they are, and that they're soon going to die if they don't wake up. The Doctor believes that Santa is their minds trying to fight back against the imposed dream. Santa suggests that the Doctor is just a subconscious warning, and calls everyone over against the Doctor's wishes. The Doctor starts arguing with Santa until Clara breaks it up, and Ashley wonders how they can know if Santa isn't one of the Dream Crabs' minions. Santa explains that they're at the North Pole, and it's Christmas Day, and says that they have to believe in him.
Everyone joins hands, including a reluctant Doctor, and they discover that Santa and his elves have disappeared. The Doctor figures that they're on their own now that they're starting to wake up, and that they have to head toward reality. The lights flare and…z
… the six of them wake up in the infirmary as their Dream Crabs dissolve into dust. They get out of the infirmary and seal the door before the sleepers can grab them. The Doctor walks out without a word and Clara goes after him. As they go outside, he tells Clara that the scientists can handle the others, and it's not his job to protect everyone. As he goes to the TARDIS, Clara wonders why Santa was on her roof.
Realizing what's wrong, the Doctor runs back inside to the control room. He says that he's not sure if the scientists are the same ones that he met earlier, and then asks Shona what she was doing when they first met. Shona says that it's a long story. The Doctor asks Ashley what their primary mission is, and she says that it's a long story. None of them can say anything else, and when the Doctor asks Clara how they came there, she says the same thing. He explains that dreams protect themselves, and asks why there are only four manuals when they have a crew of eight. This time when they recite the same place in the manuals, they say, "Very very very dead." The scientists realize that the pain in their heads is getting worse.
Clara sees the sleepers on the monitors, standing up. The Doctor tells the four scientists that the sleepers are them, and that they're nowhere close to each other. However, each of them is possessed by a Dream Crab and they've been networked into the same nightmare. The sleepers on the screen are a metaphorical construct of the death coming for them.
Albert approaches the monitor to look at his counterpart. It reaches through and pulls him into the monitor. The Doctor tells everyone else to run and uses a fire extinguisher to hold the sleepers back as they enter the control room. They go outside and the Doctor says that if they don’t wake up then they'll die just like Albert did. The sleepers start breaking through the door and the Doctor gets the others moving toward the TARDIS. However, sleepers of the Doctor and Clara emerge, cutting them off, while a dozen copies of the sleepers leave the base and approach them.
Shona asks the Doctor to tell them how to leave, and he tells them to use their imagination and leave the place. When they wonder how, the Doctor reminds them that it's Christmas and they're at the North Pole. Santa arrives in his sleigh, lands, picks them up, and leaves. As they fly through the sky, the Doctor asks Clara if she believes in Santa Claus. She says that she has but he looks a little different to her, and hugs the Doctor.
The sleigh arrives above London and Santa offers the Doctor the reins. The Doctor eagerly accepts and they soar past Big Ben at the stroke of midnight. Shona remembers that she works in a shop and her father was a scientist. Ashley remembers that she's an account manager for perfume, and she realizes that they're waking up. The Doctor says that they'll wake up in their proper places... and times. Shona suggests that they swap numbers and have a reunion... just as Bellows disappears.
Bellows wakes up in her wheelchair and her granddaughter calls her to Christmas dinner.
The Doctor warns Shona that she probably won't remember what happened. Shona turns to Ashley and discovers that she's gone.
Ashley wakes up in her bed as the Dream Crab dissolves on the pillow next to her.
Clara tells a nervous Shona that she's going home, and Shona disappears. She wakes up on her couch without remembering anything, and looks at her Christmas itinerary list, which includes possibly forgiving her boyfriend Dave. She checks the last item off.
When she and the Doctor are the only ones left, Clara says that it's a pity that they have to wake up. The Doctor disappears and wakes up on an alien planet, outside the TARDIS. Meanwhile, Clara tells Santa that she's going to wait a little longer to wait up. When he wonders why, Clara rests her head on his shoulder and echoes Danny's words of every Christmas being last Christmas.
The TARDIS materializes outside of Clara's house, following the psychic signal and uses his sonic screwdriver to remove the Dream Crab from Clara. A gray-haired Clara turns on the light and says that it's been 62 years since they last met. She says that she's missed him and they share a hug, They then go downstairs and put on Christmas hats, and the Doctor assures Clara that she'll never look any different to him. She explains that for the last 62 years she never married, and she traveled across the world and taught. There was one other man beside Danny, but it would never have worked out... because it was impossible. The Doctor helps Clara open a Christmas cracker and apologizes, He wishes that he had come back for her sooner... and Santa comes in and asks how much he wishes that.
The Doctor disappears and wakes up on an alien planet, outside the TARDIS. He goes to Clara's house and removes the Dream Crab, and then hands her a mirror. Clara confirms that she's young and the Doctor asks her to come with him. After a moment, Clara smiles and takes his hand. They run to the TARDIS and the Doctor wonders who he should thank. They leave… and a tangerine sits on Clara's windowsill.