Gandalf The Grey, later known as Gandalf the White, and originally named Olorin was an Wizard. He was sent to Middle-earth in the Third Age to fight the threat of Sauron. The Wizard joined Thorin and his company to regain the Lonely Mountain from Smaug. He left the friendship of the Ring to destroy the One Ring. He lead the Free Peoples in the final campaign of the War of the Ring.
What is his purpose?
A loyal leader, this wizard desires to both protect and push his friends to stand up and fight for what they believe in. He has little patience for those who fail to use logic or common sense and doesn’t hesitate to say whatever he has in his mind if he feels it necessary.
Gandalf plays an important role in saving Middle-earth from certain issue by helping his friends defeat Sauron and destroy the One Ring. Even after being a dreadful warrior and an intelligent wizard, Gandalf has a sense of humanity that is really comforting.
How powerful is he?
As a wizard and the bearer of a Ring of Power, Gandalf has great power. But works mostly by encouraging and persuading. He goes out as Gandalf the Grey, having great knowledge, and always traveling. He is always focused on one thing to defeat the Dark Lord Sauron. Gandalf has Narya, the Ring of Fire. Well, he delights both in fireworks to entertain the hobbits and when needed uses fire as a weapon. As one of the Maiar he is an immortal spirit. But as he came to Middle-earth in a physical body he can be killed in battle. He is sent back to Middle-earth to complete his mission, now as Gandalf the White and leader of the Istari.
Tolkien once described Gandalf as an angel incarnate. After that, both he and other scholars have liked Gandalf to the Norse god Odin in his Wanderer guise. Others have described Gandalf as a guide-figure who assists the protagonist, related to the Cumaean Sibyl who assisted Aeneas in Virgil’s The Aeneid, or to Virgil himself in Dante’s Inferno and even as prophet.