Set in the final years of England's Victorian era, Ursula Brangwen, Imogen Stubbs, is the eldest child of wealthy Derbyshire farmer Will Brangwen, Colin Tarrant, and his wife Anna Brangwen, Jane Gurnett. From the age of three, Ursula has been fascinated by rainbows, and after a rainstorm she runs off with a suitcase, hoping to look for the pot of gold at the end of it. To ease her imagination, her father crafts a rainbow on a jam sandwich, using several spreads of different flavors to mirror the spectrum she loves.
During her teenage years, Ursula enters a same-sex romance with her older swimming and gym teacher Winifred Inger, Kate Buffery, while at the same time developing feelings for Anton Skrebensky, Martin Wenner, a student at the nearby boys' high school who plans to enlist in the Army after graduation. Ursula and Winifred spend romantic weekends together at Winifred's house and hike in the surrounding hills. Winifred then introduces Ursula to an artist friend who encourages her to model in the nude for his paintings, but she is thrown out after she refuses his advances and demands fair pay.
One weekend Ursula brings along Winifred as her chaperone to visit her father's wealthy older brother, Uncle Henry, who is taken with Winifred and proposes marriage. Winifred accepts, which stirs jealousy in Ursula.
Feeling abandoned after Winifred marries Uncle Henry, and with Anton away fighting in the Second Boer War in South Africa, Ursula decides to restart her life by becoming a schoolteacher. After finishing high school, Ursula moves to London to teach at a poor elementary school in the East End, where she is confronted by a lack of discipline and hygiene among the children and the lecherous headmaster who pressures her. She initially resists a harsher regime of punishment, but after being provoked by a belligerent boy who pelts her with stones, she finally loses her temper and cane him in full view of the class and staff. The moment quiets the class and stops the headmaster's advances, yet Ursula is left guilt-ridden and ultimately resigns at the end of the school year.
Back at the family farm a year and a half later, Ursula is reunited with Anton, who has returned from war, and she shares a casual reunion with Winifred, who is now married with a baby. Ursula then decides to rekindle her romance with Anton, while also volunteering with a local miners' union to help unprivileged workers secure better wages and safeguards. When she fears she might be pregnant, Anton proposes marriage, but she declines, choosing to chart her own path in life.
Not pregnant after all, Anton leaves her for good, marrying another woman and moving to India. A heartfelt talk with her father about life and its various paths leads Ursula to start over by taking another teaching position in a town about two hours away. In the final scene, Ursula packs a suitcase and runs from her house to chase another rainbow that appears after a storm, a vivid symbol of the hope and possibility she has chased since childhood.