In mid-nineteenth-century Boston, eight-year-old Gerty is an unloved orphan living with Nan Grant, a harsh woman who has tolerated the child since Gerty's mother died in her house five years earlier. Gerty's only pleasure is watching the old lamplighter, Trueman Flint, light the street lamp each evening. After accidentally knocking her down one night, he makes amends with a small kitten, which becomes her sole source of affection. About a month later, Nan discovers the kitten and flings it into a vessel of steaming water, killing it. Gerty strikes Nan in rage, and Nan thrusts her out into the freezing night. True finds the screaming child and brings her to his modest home, resolving to keep and raise her.
Gerty falls dangerously ill and is bedridden for three weeks. True nurses her with help from Mrs. Sullivan, a gentle widow who lives in the other half of the house. Emily Graham, the blind daughter of True's former employer, Mr. Graham, sends money for Gerty's clothes. When Gerty overhears True describing Emily's encouragement to Mr. Cooper, the church caretaker and Mrs. Sullivan's father, she asks if she can stay forever, and True promises she shall be his child. As Gerty recovers, Mrs. Sullivan teaches her housekeeping, and Willie Sullivan, Mrs. Sullivan's 12-year-old son, befriends her. Through a plaster figurine of the biblical boy Samuel at prayer, Willie introduces Gerty to the concepts of God and prayer. That night she kneels at her window and offers her first wordless prayer.
Gerty meets Emily by chance in a church. Though blind, Emily possesses a gentle voice and spiritual warmth that captivate the child, and when Gerty discovers Emily's blindness, both are moved to tears. Emily commits to guiding Gerty's moral development, recognizing how a violent temper can destroy a life. When Gerty runs home from school in fury after classmates mock True, Emily teaches her about forgiveness: To be forgiven by God, one must forgive others. Emily's Sunday teachings gradually transform Gerty. She has Gerty read to her daily from challenging books, and Willie, now clerking for the merchant Mr. Clinton, studies French with Gerty in the evenings. By age 12, Gerty has progressed rapidly through the public schools.
When Gerty is about 13, True suffers a paralytic stroke. Gerty becomes his devoted nurse, managing their dwindling finances and reading him the Bible each night. Emily solemnly promises True that if he dies, she will take Gerty into her home and provide for her. True dies peacefully in his sleep, and Gerty, now called Gertrude, moves into the Graham household, where Emily gives her a thorough education to prepare her as a teacher.
Gertrude clashes with Mrs. Ellis, the Graham housekeeper, who resents her as a rival for Emily's affection. When Mrs. Ellis orders Gertrude's treasured keepsakes from Uncle True destroyed, Gertrude masters her impulse toward rage through prayer, achieving her first complete victory over her violent temper. Meanwhile, Mr. Clinton offers Willie a position at his mercantile house in Calcutta, India. Though devastated by the separation, Willie accepts to support his family, entrusting his mother and grandfather to Gertrude's care.
Years pass. As Gertrude matures into a young woman of 18, she learns that Mrs. Sullivan is seriously ill and Mr. Cooper's mind is failing. She leaves the Grahams to care for them, taking a teaching position at her former school. Mr. Graham calls her ungrateful, but Emily supports the decision. During this difficult winter, Gertrude teaches mornings and nurses afternoons. She encounters the desperately ill Nan Grant and, despite their cruel history, forgives her and tends her through her final illness. Both Mr. Cooper and Mrs. Sullivan die within weeks of each other.
Gertrude secures a room at Mrs. Warren's boarding house, where she befriends Fanny Bruce, a lonely schoolgirl and younger sister of the vain neighbor Ben Bruce. When Mr. Graham marries the widow Holbrook, Emily grows unhappy in the noisy new household, and Gertrude returns as Emily's companion. At the Grahams' country house, Isabel Clinton, called Belle, and her cousin Kitty Ray join the household as Mrs. Graham's nieces. Belle treats Gertrude with scorn, while Ben Bruce pursues Gertrude. When she refuses him, he deliberately courts Kitty to provoke jealousy. After Gertrude refuses his formal proposal, Ben reveals his attentions to Kitty were a ploy. Kitty, who has overheard everything, is devastated. Mr. Graham perceives the mistreatment and lets Emily and Gertrude stay behind while the family goes to Europe.
Emily's health gradually fails, and Dr. Jeremy, the family physician, takes both women traveling. Throughout their journey, Gertrude encounters a melancholy stranger with prematurely gray hair, introduced as Mr. Phillips, who shows her kindness and engages her in conversations about faith and suffering. At Saratoga, Gertrude spots Willie walking with Isabel and is devastated when he passes without recognizing her. Gossip suggests they are engaged. Mr. Phillips rescues Gertrude from nearly being struck by a railway car and counsels her not to trust idle rumor.
On their last night at Saratoga, Gertrude confides her anguish to Emily, who reveals her own tragic past: She once loved her stepbrother, Philip Amory, but Mr. Graham accused Philip of forgery. During the confrontation, Philip accidentally spilled acid on Emily's eyes, blinding her permanently. He was banished and reported dead. On a steamboat from Albany to New York, fire breaks out. Mr. Phillips, calling Gertrude his child, swims Emily to shore first, then returns. Finding the terrified Isabel clinging to Gertrude, Gertrude wraps her own identifying blue veil around Isabel's head and lowers her to Mr. Phillips, sacrificing her chance of rescue because she believes Willie loves Isabel. Deceived by the veil, Mr. Phillips carries Isabel to safety. Gertrude leaps into the water and is rescued unconscious.
After recovering, Gertrude receives a letter from Mr. Phillips revealing himself as Philip Amory, Emily's long-lost stepbrother and Gertrude's own father. He explains that Gertrude was born during his brief marriage to a ship captain's daughter in Rio de Janeiro. After Philip was believed dead from fever, his wife died at Nan Grant's house, leaving infant Gertrude in Nan's care. Philip discovered the truth years later when he encountered Nan's son Stephen in California and recognized a stolen family ring. Gertrude rushes to her father, then leads him to Emily, assuring him Emily never hated him. Emily and Philip reunite after 20 years of grief rooted in misunderstanding, and Mr. Graham confesses the forgery was committed by a trusted clerk named Archer.
Philip tests Willie's character by urging him to pursue Isabel for her wealth, but Willie declares his devotion to Gertrude. At Uncle True's grave, Willie confronts Gertrude about her coldness, and the misunderstanding unravels: His attentions to Isabel concerned only her ailing father, Mr. Clinton, whom Willie had been nursing. Their love is openly declared at last. That evening, Philip reveals that Gertrude is his daughter and saved Isabel's life on the burning boat. Willie and Gertrude's engagement is acknowledged, Kitty announces her engagement to a minister, and Philip reclaims his family's ancestral estate. Through Emily's patient spiritual influence, Philip recovers his lost faith and asks Emily to marry him. Willie and Gertrude settle into a happy home. On a winter evening, watching the stars as a gasman lights the street lamps, Gertrude reflects that Uncle True's lamp still burns brightly in heaven and is not yet gone out on earth.