Gandalf the Grey

Tolkien discusses Gandalf in his essay on the Istari, which appears in the work Unfinished Tales. He describes Gandalf as the last of the wizards to appear in Middle-earth, one who: "seemed the least, less tall than the others, and in looks more aged, grey-haired and grey-clad, and leaning on a staff". Yet the Elf Círdan who met him on arrival nevertheless considered him "the greatest spirit and the wisest" and gave him the elven Ring of power called Narya, the Ring of Fire, containing a "red" stone for his aid and comfort. Tolkien explicitly links Gandalf to the element Fire later in the same essay:

Valinor
In Valinor, Gandalf was known as Olórin. As recounted in the "Valaquenta" in The Silmarillion,[3] he was one of the Maiar of Valinor, specifically, of the people of the ValaManwë; and was said to be the wisest of the Maiar. He lived in the gardens of Irmo under the tutelage of Nienna, the patron of mercy. When the Valar decided to send the order of the Wizards to Middle-earth in order to counsel and assist all those who opposed Sauron, Olórin was proposed by Manwë. Olórin initially begged to be excused as he feared Sauron and lacked the strength to face him, but Manwë replied that that was all the more reason for him to go.[4]

As one of the Maiar, Gandalf was not a mortal Man but an angelic being who had taken human form. As one of those spirits, Olórin was in service to the Creator (Eru Ilúvatar) and the Creator's 'Secret Fire'. Along with the other Maiar who entered into the world as the five Wizards, he took on the specific form of an aged old man as a sign of his humility. The role of the wizards was to advise and counsel but never to attempt to match Sauron's strength with his own, and hopefully the kings and lords of Middle-earth would be more receptive to the advice of a humble old man than a more glorious form giving them direct commands.

Middle-earth
Gandalf the Grey was the last of the Istari landing in Mithlond. He seemed the oldest and least in stature of them, but Círdan the Shipwright felt that he had the highest inner greatness on their first meeting in the Havens, and gave him Narya, the Ring of Fire. Saruman later learned of the gift and resented it. Gandalf hid the ring well, and it was not widely known until he left with the other ring-bearers at the end of the Third Age that he, and not Círdan, was the holder of the third of the Elven-rings.

Gandalf's relationship with Saruman, the head of the Order, was strained. The Wizards were commanded to aid Men, Elves, and Dwarves, but only through counsel; it was forbidden to use force to dominate them — an injunction that Saruman disregarded.