Madge Arwell is cycling down a darkened country road when there is an explosion in the field next to her. She loses control of her bike and crashes into a red telephone box. She makes her way to a crater in the middle of the field and sees a man in a space suit lying in the hole. He asks her for help with his helmet. She raises the visor and he tells her that he is blind but she reassures him that the helmet is on backwards. He tells her that he got dressed in a hurry. She returns home and tells her son, Cyril, that she has borrowed Mr Goldsmith's car to drive a space man (or possibly an angel) into town to find a police telephone box. After a bumpy ride she finds the telephone box. She tells the Doctor he needs to take the suit off but he tells her he can't because it is an impact suit and it is still repairing him. When he can't find the TARDIS key she opens the phone box door with a pin. He asks her name and then tells her that if she ever needs a favour in return she should make a wish. He enters the door but it is the wrong box. He asks her if she can help him find another one.
Three years later, during World War II, Madge's husband Reg is piloting a damaged Lancaster Bomber over the English Channel. He tells the crew that he is taking them home for Christmas.
Madge receives a telegraph telling her that her husband is missing, presumed dead, just before Christmas. She decides not to tell her children just yet. Instead, she makes a wish. Due to the wartime evacuations, she takes the children to Uncle Digby's house in Dorset. The house is a country mansion that has been left in the care of Mr Cardew the caretaker. However, the door is opened to them (or rather, the door falls off its hinges) by the Doctor, calling himself "the Caretaker". He greets them by name: Madge (who does not recognize him from their previous meeting), ten year old Cyril and Madge's beautiful fourteen year old daughter, Lily.
The Doctor gives them a guided tour of the house which he has 'repaired' for their visit. This involves spinning chairs in the smaller sitting room, a lemonade tap in the kitchen and a bedroom for the children so full of tricks and toys that the only way he could put beds in is to suspend hammocks from the ceiling. The children are astonished by all of this but Madge takes the Doctor aside and explains about Reg's death. She says that she finds it hard to see the children happy when she knows that they will soon be sad. The Doctor tells her that they should be allowed to be happy precisely because they will soon be so sad. Madge decides to give them the best Christmas ever before she imparts the bad news to them. The sound of the children's laughter draws her to the large sitting room where the Doctor has mechanised a Christmas tree. Beside the tree is a large blue present that glows and whispers. The label says that it is for all of them but Cyril is the most drawn to it.
In the night, Cyril asks Lily if they can go down to see what is in the present. She tells him to go to sleep but as soon as he does she sneaks off to go downstairs. On the way, she is attracted by sounds from the attic and goes up to the Doctor's room to investigate. As she does, Cyril sneaks down the stairs.
Lily finds the Doctor hard at work on some wiring. Beside him is the TARDIS which he tells her is his wardrobe. As he checks the wires he asks where Cyril is. Lily goes back to the bedroom and sees what she thinks is her brother in her his hammock. She reports back to the Doctor who assumes that whatever he is working on is faulty.
Cyril, meanwhile, has opened the large present under the Christmas tree and found it to be a portal to a snow-covered forest. He crawls through and sees one of the trees sprout a silver bauble which falls to the ground, grows in size and cracks open. He flees back through the portal but soon returns. He sees footprints leading from the bauble, deeper into the wood. He follows.
The Doctor becomes convinced that Cyril has been in the portal and goes with Lily to Cyril's hammock, discovering that the boy has used the "old bear and duvet" trick to make it seem as if he is still in bed. They follow him through the portal. Lily wants to know where they are so the Doctor tells her they have gone through a dimensional portal. They notice that the footprints that Cyril is following are growing larger. When Lily brushes against a tree, more 'baubles' grow. The Doctor tells her that he chose this place as a perfect destination for Christmas but something is wrong: the trees are agitated and talking to each other. When he looks into a bauble his face is reflected back and then replaced by a wooden one. Lily accuses him of being irresponsible, taking them to a distant planet in the future but he replies that it was meant to be a supervised trip and the planet used to be one of the safest he knows.
Cyril arrives at a tower and enters. He finds a giant wooden statue of a king in its throne. As he passes it to go up the stairs the king turns its head. Madge, meanwhile, finds her children missing and follows them into the forest. She is accosted by three armed soldiers who scan her for weapons. They find that she is either armed or wearing wool and settle for the latter. Madge breaks down in tears.
At the tower, Cyril reaches the top room and finds a wooden queen standing behind a throne. She is holding a metal circlet.
The Doctor and Lily enter the tower. The Doctor tells her that the wooden king was hatched from a bauble less than an hour ago. He also notes that the whole building is grown from trees into the shape of a building. He says that it is a trap for people but they can't leave until they have found Cyril.
Madge's crying eventually persuades the three soldiers to put down their weapons. They say that they are from Androzani Major and the year is 5345. They ask Madge where she is from and she tells them "England, 1941." She produces a pistol and tells them that she is looking for her children.
The Doctor and Lily arrive at the top of the tower but the Doctor's sonic screwdriver won't open the wooden door. As he tries to find a new setting Lily looks out of a window and sees stars coming out of the trees. The Doctor tells her that it is the life force. She says that it is so beautiful it is making her cry and the Doctor replies that crying when happy is "so human." A whooshing sound and a golden light from beyond the door make them redouble their attempts to get in. Inside the room the wooden queen is putting the circlet, now glowing, onto Cyril's head. The king leaves his seat below and starts to come up the stairs.
Madge takes the three soldiers into the cockpit of a huge walking machine. The soldiers tell her that the Androzani trees in the forest are about to be melted down with acid rain to make battery fuel. Anyone outside will be killed. Madge has Billis, the female soldier, tie up the two males. Billis detects life signs in the forest but says she is not trained to drive the machine to them.
The door at the top of the tower opens. Lily and the Doctor enter, followed by the wooden king. Cyril is connected to them by the circlet and translates their thoughts. The trees are screaming and the stars are leaving the trees because of their fear.
A warning announcement, saying there is five minutes to acid fall, accompanies the three soldiers being beamed out. Madge is left alone. She can hear her children over the machine's communications. Cyril is telling the Doctor that the stars are leaving because they are frightened of the rain. The Doctor says that the stars need to evacuate inside a living thing. The top of the tower, a large sphere, is an escape pod. The queen says that they cannot escape because Cyril is weak and the forest cannot live in him. The Doctor says that he is stronger and takes the circlet but it is too painful. Lily takes it and says it is tingly. The queen says that Lily is too young. The rain starts to fall.
The Doctor says that the tower won't protect them for long. He wants them to get back to the portal but the children refuse to leave until their mother comes. Madge promptly arrives, driving the Androzani harvester until it crashes to the floor near the tower. Madge runs inside the tower, her clothes holed by the rain. The wooden queen identifies her as "strong" and places the circlet on Madge's head. The Doctor realises they think she is the "mothership" and therefore able to carry the life force safely. The stars pour into the band and Madge absorbs them. The top of the tower lifts off and flies into the time vortex. The Doctor tells Madge to think of memories of home. To do this she remembers Reg and the pod homes in on Reg's stricken aeroplane. She begs them not to make her watch her husband die but as they pass the plane Reg starts to follow the pod as it is the only thing he has to navigate by.
The escape pod is lands safely just outside the house in Dorset. The life force of the forest converts itself to a waveband of light among the stars and the king and queen's bodies lie, empty on the floor. The Doctor steps outside, leaving Madge to explain their father's death to Lily and Cyril but he quickly returns to tell them to come outside. The Lancaster bomber and a bewildered Reg are on the lawn outside. The family is joyfully reunited.
Madge and her family begin to celebrate Christmas and the Doctor tries to slip away unnoticed. Madge tracks him down in the attic and realises that he is the man in the space suit from three years ago. She invites him to stay for Christmas but the Doctor insists on leaving. She thinks he has other friends to go to but he tells them that they all believe he is dead. Madge persuades him to go to see them for Christmas. The Doctor tells her that if Madge ever needs him again she only has to wish.
The Doctor arrives outside Amy and Rory's home. It is two years since he left them there and Amy is angry at him for letting them think that he is dead before she reveals that River Song told them he was alive. They hug and Amy calls Rory to the door. They tell the Doctor that a place is set for him at the table. He asks how they knew he was coming but Amy tells him they always set him a place. The Doctor follows them over the threshold, crying with happiness.