Gandalf says “You shall not pass” while confronting the Balrog in The Fellowship of the Ring.
The scene takes place on the Bridge of Khazad-dûm beneath the Mines of Moria. After the Fellowship flees from Orcs and other dangers, the Balrog pursues them. Gandalf stands on the narrow bridge, breaks it beneath the creature, and prevents the Balrog from crossing.
The Balrog’s whip catches Gandalf as he falls. He tells the Fellowship to flee, and the company believes he has died. In Tolkien’s story, Gandalf and the Balrog continue their struggle before both fall through the depths of Moria. Gandalf later returns as Gandalf the White, transformed and given renewed authority.
The quotation is often remembered from film adaptations, but it also belongs to Tolkien’s novel. The wording varies in punctuation and presentation across editions and adaptations, while the speaker and confrontation remain the same.