Now that the scholars have settled their dispute (or maybe they haven't, but anyway) I'd like to add my two-pence worth:
Who or what is
Gandalf? This is an interesting question and even more so when we look beyond the boundaries of
Middle-Earth.
Gandalf - like
Galadriel - was a later addition to "
Tolkien's Legendarium", his name - like most of the names for the
Dwarves in
The Hobbit - is "borrowed" from the
Volospá, part of the
Codex Regius (these poems are better known as
Poetic Edda): gand-âlfr, which Tolkien interpreted as "
Elf with a wand" or - in The Hobbit - as a "mere" Wizard. And in some ways Gandalf - as a character - there still resembles the "Man-in-the-Moon" from
Roverandom. Humphrey Carpenter, in his TolkienBiography, mentions that in the manuscript of The Hobbit, Gandalf was the name of the chief
dwarf, whereas Bladorthin was the name of the wizard.
Another inspiration for the character of Gandalf seems to have been a painting called "Der Berggeist" by Joseph Madlener from the second half of the 1920s, which can be seen
at the Houghton Mifflin website.
So, what we encounter with Gandalf is a very interesting "metamorphosis", from a dwarf (dwarfs in Germanic/Nordic Mythology, btw., are said to have originally been maggots in the flesh of Ymir, a primeval giant) to a "magic Elf" and a Wizard and finally an angelic messenger of the Gods/Powers, whose re-incarnated self eventually saves Middle-earth from falling under the shadow of
Evil...
(c.f. http://www.thetolkienwiki.org/wiki.cgi?Gandalf)