Gandalf is a character from J. R. R. Tolkien's world-famous trilogy, The Lord of the Rings. Throughout these books, Gandalf is portrayed as an old man, a wizard, slightly bent as if bearing a great weight, at once cheerful to his friends and horribly direct towards his enemies. He wears a great, long, grey beard, and grey eyebrows which are large enough to stick out beyond the brim of his tall, pointed grey hat. He commonly dresses in a long cloak and riding boots. What is not made obvious in the trilogy, in fact information is only given in the other Tolkien works set in the World of Arda, is that Gandalf and his fellow Wizards of the White Council, Saruman the White, Radagast the Brown and the two unknown Blue Wizards, Gandalf is in fact not human at all.

Gandalf is an Istari, a Wizard of Middle Earth. He is in fact a Maia spirit known as Olorin, and has existed since the beginning of the world. Before coming to Middle- Earth he lived in the gardens of the great Valar spirit Lorien in the Undying Lands, and was a frequent visitor to the Valar Nienna the Compassionate. About the year 1000 in the Third Age of the Sun, Gandalf was chosen as one of the Istari and sent to Middle-Earth to assist its peoples against Sauron, the Lord of the Rings.

In Westron speech, the language of Men, he is known as Gandalf the Grey. To the Elves he is known as Mithrandir, the 'Grey Pilgrim' as translated from the Silvarin elvish tongue. He is also known as Tharkun to the Dwarves, and Incanus to the Haradrim people. Upon his arrival in the Grey Havens, the ancient elvish port between Middle-Earth and the Undying Lands, Gandalf was gifted the ring Narya the Great by Cirdan. Although he never reveals the ring in his posession, Narya is in fact one of the Great Rings, the Ring of Fire.

For over two thousand years, Gandalf worked against the evil powers rising in Middle-Earth. In 2951 (Third Age) he inspired the Quest of the Lonely Mountain that resulted in the slaying of Smaug, the Dragon that had resided there since the War of Wrath thousands of years before. During this quest, Gandalf acquired the great elvish sword of Glamdring, and his friend and companion Bilbo Baggins acquired the One Ring, the Ring of Power. In 3018, Gandalf came to Frodo Baggins in the Shire and initiated the Quest of the Ring. In Rivendell he joined the Fellowship of the Ring, and guided them through many perils on their quest to Mordor, the Land of Shadows, in order to destroy the Ring for all the peoples of Middle-Earth.

During the Quest, the Fellowship were forced to travel through the great dwarf kingdom of Moria, after an unsuccessful attempt to cross the mountain of Caradhras. During the crossing of Moria, Gandalf was forced into single combat with a Balrog, an evil Maiar corrupted millennia ago by Melkor, the Valar who turned against the Powers of Arda, to whom Sauron was a mere lieutenant. Although Gandalf was ultimately victorious, he himself was also slain by a treacherous final blow from his fallen enemy. For a brief period his spirit left Middle-Earth and the Fellowship were forced to journey alone, but Gandalf had not yet completed his task.

Gandalf returned to Middle-Earth, this time as Gandalf the White, the highest of his order, a radiant being against whom all mortal weapons were useless. He assumed this status due to the treason of Saruman, who turned to Sauron's side before attempting to grab power for himself. Upon his return, Gandalf's only concern was the defeat of the evil Maiar spirit Sauron, and for a short period he was everywhere. His deeds during this period are many; he inspired King Theoden of the Rohirrhim into an alliance with Gondor against Sauron, for which he was rewarded with the great horse Shadowfax; he journeyed to Isengard after its destruction and cast Saruman out of the White Council, breaking his staff and hence taking away the bulk of his power; he held the gates of Minas Tirith ('the Tower of the Guard') against the forces of the Witch-King of the Nazgul and the armies of Sauron. Finally, he fought with the armies of Gondor at the Black Gates of Mordor, distracting Sauron's orc armies long enough to allow Frodo, the Ringbearer, to cast the Ring into the volcano Mount Doom, destroying it forever.

After the War of the Ring, Gandalf oversaw the reuniting of the two great kingdoms of Arnor and Gondor, before finally embarking on the Last Sailing of the Keepers of the Rings to the Undying Lands in 3021.