Set in a small Swiss mountain village, the story begins on Christmas Eve, when seven-year-old Annette Burnier walks home from church carrying a golden gingerbread bear. Her mother fell ill that morning, and Annette's father fetched a doctor from a nearby town. When Annette arrives home, the nurse presents her with a newborn baby brother. Her mother whispers that the baby belongs to Annette, to bring up and love, then closes her eyes. That night, Annette's mother dies.
The baby, named Daniel but called Dani, becomes Annette's devoted charge. She cares for him so attentively that he grows into an exceptionally healthy child. When paying a nursemaid grows too expensive, Annette proposes staying home from school to look after Dani herself. Her father's elderly mother arrives by train to help. Though she has rheumatism and limited vision, Grandmother takes over cooking and mending while Annette manages Dani and the house. The schoolmaster reluctantly agrees to let Annette stay home if she visits him every Saturday for testing.
Five years later, on Christmas Eve, five-year-old Dani secretly places a red slipper outside the back door and prays for a gift. On Christmas morning, he finds a tiny, half-frozen white kitten curled inside. He names it Klaus, and the kitten becomes his constant companion.
Lucien Morel, a boy of about 11 who lives up the mountain with his widowed mother and older sister Marie, grows resentful about the hard work expected of him. One morning, distracted by anger, he crashes his sled into Annette's at a fork in the path, sending her into a ditch. Instead of helping, he shouts at her and races off. The schoolmaster canes Lucien. Walking home, Lucien encounters Dani building a snowman and kicks it apart. Annette flies down the path and slaps Lucien across the face. Neither child will apologize, and the quarrel hardens into lasting hostility.
The following March, Dani goes up the mountain alone to pick wildflowers for Annette's birthday. Lucien finds him, tramples the flowers, and grabs Klaus, holding her over a rocky ravine and demanding Dani promise silence. Klaus scratches Lucien's hand, and he accidentally drops her onto a ledge below. Dani hurls himself over the wall to rescue his kitten, slips on wet rock, and falls. Lucien, believing he has killed the child, flees home sobbing.
Annette and her father search the fields and find Lucien hiding in a loft, where he tells them Dani is dead. At the ravine, Annette's father descends on a rope and finds Dani alive on a jutting boulder, conscious but with his leg badly broken beneath him. He carries Dani out and retrieves Klaus. That night, Annette vows never to forgive Lucien. She tells Marie the full story, ensuring the village learns what happened.
At the hospital, a doctor sets Dani's leg in plaster. During weeks of recovery at home, Dani becomes the darling of the village, showered with visits and gifts. Meanwhile, the village collectively shuns Lucien: The schoolmaster denounces him, children ignore him, and shopkeepers serve him in silence.
Hiding in the forest one day, Lucien begins whittling and discovers a talent for carving. He encounters the old man of the mountain, a recluse feared by the village, who praises his work and invites him to learn with proper tools. Lucien carves a Noah's ark set for Dani as a peace offering, but when he brings it to Annette, she furiously kicks it into the woodpile and orders him away.
A school handwork competition is announced. Lucien carves a galloping horse, confident it will restore his standing. Annette spots it on the Morel balcony and, recognizing it would win easily, pushes it over the railing and stamps on it. Guilt immediately darkens her mood. At the competition, Annette wins the girls' prize but feels no happiness. Lucien climbs to the old man for comfort. The old man shares his own story of ruin and redemption: He was once a banker who lost everything through gambling and crime, went to prison, and lost his wife. After his release, a farmer took him in and helped him find faith. The old man has been saving money to repay his debts, and he tells Lucien that anyone can start again.
Months pass. Dani is fitted with crutches carved with bear heads, and the doctor confirms his injured leg is permanently shorter. At Christmas, the pastor preaches on Revelation 3:20, about Jesus knocking at the door of one's heart. Annette feels drawn to respond but cannot open her heart while it is full of hatred and guilt. Grandmother explains that one does not chase away darkness before opening the shutters; one simply opens them, and light replaces darkness naturally.
Soon after, while searching for the missing Klaus, Annette sprains her ankle on an icy bridge. Unable to walk, she crawls to a locked chalet and realizes she now knows what it feels like to knock and get no answer. Lucien, skiing home, hears her cry, wraps her in his cloak, and goes for a sled. While waiting, Annette prays, opening her heart to Jesus. When Lucien returns, she confesses that she destroyed his horse. He forgives her immediately. Lucien brings her home, where Grandmother welcomes him warmly and reads them a Bible verse about perfect love driving out fear. That night, Klaus returns through the door carrying three newborn kittens, depositing them one by one on sleeping Dani's bed.
Annette then takes the Noah's ark animals to the schoolmaster, confesses that she destroyed Lucien's competition entry, and offers her own prize so Lucien can receive one. The schoolmaster presents Lucien with the prize in class, and the children admire his carvings.
That evening, Marie mentions that a famous bone specialist named Monsieur Givet is staying at the hotel where she works, leaving on the early train. Lucien resolves to reach him that night. He climbs through a blizzard to the old man's chalet and asks for the money the old man has saved. The old man gives him everything. Lucien crosses the mountain pass on skis, nearly turning back from terror until he recalls the verse about perfect love driving out fear. He arrives at the hotel at dawn and collapses. Monsieur Givet revives him, hears his story, and agrees to see Dani. Lucien silently asks Jesus to come into his heart, as Annette did.
The doctor examines Dani and explains the bone was set improperly but can be broken and reset through surgery at no charge, since Lucien has already paid. When Dani refuses to go without Annette, Monsieur Givet offers to take her along as a helper for his wife. Before leaving the village, the doctor climbs to the old man's hut and discovers the recluse is his own father, long believed dead. He kneels and says he has come to take him home.
At the lakeside hospital, Dani undergoes surgery and endures a painful recovery. He is comforted by a picture on the ward wall of Jesus surrounded by children. When the weights are removed and his fever breaks, he gives his bear-head crutches to another child in the ward, declaring he will never need them again.
Back in the mountains, Lucien visits Grandmother regularly, reading Annette's letters aloud and helping with chores. The school community accepts him again, his bravery having redeemed him. The old man departs to live with his son's family, leaving Lucien a carved wooden cross and telling him the cross is where love is made perfect.
A letter announces the children's return. The whole family gathers at the station. Dani jumps off the train and runs straight to Lucien, walking without crutches, proving the doctor has healed him completely. Lucien turns away with tears in his eyes, overwhelmed that his wrong has been forgiven and undone.