As others have said, Gandalf is not an Elf, nor was he ever one in various drafts/earlier phases (Gandalf was arguably merely a Man in the process of writing The Hobbit, and Tolkien invented the Istari later, after working on Lord of the Rings).
But! And here's the ironic part: Gandalf's name is taken from a real-world source, "Gandálfr" from the Völuspá, in the Poetic Eddas. This name means "wand-elf" (or "staff-elf") in Old Norse!
Many of the Dwarf names in the Hobbit are so sourced, and in earlier drafts of The Hobbit, Gandalf was the name of the leader of the Dwarves (who we know as Thorin), with the wizard called "Bladorthin". So there was really no special intent to link Gandalf (the wizard) with Elves.
That said, Tolkien later retroactively explained this choice of name as being part of his "translated text" frame, whereby the dialect of the men of the north of Middle-earth was translated in Norse-related terms. And so the Dwarves of Erebor, taking "public" names in the vernacular of their region, took Old Norse names in Tolkien's translation of their fictional Westron dialect original. And, further, the Khuzdul name of Gandalf, "Tharkûn", is also glossed as "staff-man".
And Tolkien leans even further into his originally arbitrary choice:
Mostly he journeyed unwearingly on foot, leaning on a staff; and so he was called among Men of the North Gandalf, “the Elf of the Wand”. For they deemed him (though in error, as has been said) to be of Elven-kind, since he would at times works wonders among them, loving especially the beauty of fire; and yet such marvels he wrought mostly for mirth and delight, and desired not that any should hold him in awe or take his counsels out of fear.
Unfinished Tales, Part 4, Chapter II, "The Istari"
And so, ironically, Tolkien settled on the explanation that Gandalf got his name because Men in the north of Middle-earth thought he was one of the Elves!