Gandalf possesed Power of the mind and ability to influence people and great wisdom.
Gandalf is the wisest of the Maiar. He was known as Olórin, who sometimes dwelt in the gardens of Irmo and was the pupil of Nienna, who taught him wisdom and pity, and of Manwë and Varda. When the Valar decided to send the order of the Wizards (also known as the Istari) to Middle-earth, Olórin was proposed by Manwë and Varda, in order to counsel and assist all those in Middle-earth who opposed the Dark Lord Sauron. Upon entrance in Middle-earth, Gandalf (Olorin) spent a good thousand or two years walking among the elves as a stranger and learning from them and teaching them. He later revealed himself as Istari, and has come to be known as the wisest of that order. He is the wisest and most powerful of the Five Wizards: although some have conjectured that Saruman was more powerful due to his pre-War position as head of the Wise, Tolkien wrote that Saruman knew Gandalf possessed the greater power and wisdom and hated him for it.(Appendix B: The Tale of Years, The Third Age, Year 2953).