Era sabido que havia algo perigoso em Moria. Glóin diz ao Conselho de Elrond:
Não acredito que alguém na Terra-média soubesse que a maldição de Durin era, na verdade, um Balrog. Na Carta 144, Tolkien escreveGlóin sighed. ‘Moria! Moria! Wonder of the Northern world! Too deep we delved there, and woke the nameless fear. Long have its vast mansions lain empty since the children of Durin fled. But now we spoke of it again with longing, and yet with dread; for no dwarf has dared to pass the doors of Khazad-dum for many lives of kings, save Thrór only, and he perished.
The Lord of the Rings Book Two, Chapter 2: The Council of Elrond
Page 240 (Houghton Mifflin Harcourt; Single Volume 50th Anniversary Edition)
The Balrog is a survivor from the Silmarillion and the legends of the First Age. So is Shelob. The Balrogs, of whom the whips were the chief weapons, were primeval spirits of destroying fire, chief servants of the primeval Dark Power of the First Age. They were supposed to have been all destroyed in the overthrow of Thangorodrim, his fortress in the North. But it is here found (there is usually a hang-over especially of evil from one age to another) that one had escaped and taken refuge under the mountains of Hithaeglin (the Misty Mountains). It is observable that only the Elf knows what the thing is – and doubtless Gandalf.
The Letters of JRR Tolkien: Letter 144
Sabemos que Aragorn previu que Gandalf estaria em perigo se ele entrasse em Moria. Quando Gandalf pergunta quem o seguirá até Moria, Aragorn o avisa
‘I will,’ said Aragorn heavily. ‘You followed my lead almost to disaster in the snow, and have said no word of blame. I will follow your lead now – if this last warning does not move you. It is not of the Ring, nor of us others that I am thinking now, but of you, Gandalf. And I say to you: if you pass the doors of Moria, beware!’
The Lord of the Rings Book Two, Chapter 4: A Journey in the Dark
Page 297 (Houghton Mifflin Harcourt; Single Volume 50th Anniversary Edition)
O fato de Gandalf entrar em Moria apesar do aviso não significa que ele não acredite. Celeborn e Galadriel discutem isso
Assim, temos provas de que Gandalf e Aragorn sabiam que Gandalf estaria em perigo em Moria algum tempo antes de entrar. Eu não encontrei nenhuma escrita de Tolkien que confirme que isso era significante para acontecer, mas isso estaria de acordo com o modo como grandes eventos como este trabalho. Em outras palavras, acredito que Gandalf sempre teve a intenção de se sacrificar, embora os detalhes (como o Balrog) possam ter mudado se as coisas tivessem acontecido de outra forma.‘Alas!’ said Celeborn. ‘We long have feared that under Caradhras a terror slept. But had I known that the Dwarves had stirred up this evil in Moria again, I would have forbidden you to pass the northern borders, you and all that went with you. And if it were possible, one would say that at the last Gandalf fell from wisdom into folly, going needlessly into the net of Moria.’
‘He would be rash indeed that said that thing,’ said Galadriel gravely. ‘Needless were none of the deeds of Gandalf in life. Those that followed him knew not his mind and cannot report his full purpose. But however it may be with the guide, the followers are blameless.
The Lord of the Rings Book Two, Chapter 7: The Mirror of Galadriel
Page 356 (Houghton Mifflin Harcourt; Single Volume 50th Anniversary Edition)
Embora Tolkien não goste de alegoria, podemos certamente ver o paralelo entre o sacrifício de Gandalf e a crença cristã na (sempre planejada) morte e ressurreição de Jesus. E é improvável que isso seja acidental.