Gandalf does not belong to the races existing on Middle Earth - Elf, Dwarf,
Man, or Orc, or any beast that resides there. According to the appendix, he is a Maia, something like a lesser Vala. (The Valar are the equivalent of the Greek Gods).
read more >>