If you're referring to the incident where the party was trapped in trees - Gandalf in fact did not get rid of the wargs and the Goblins. There were simply too many of them (there's even a reference to Gandalf preparing to go out in a blaze of glory against them). The party survived because they were rescued by eagles.
If you're referring to the wargs and goblins at the Battle of Five Armies, Gandalf got rid of them because ultimately the combined forces humans, elves, dwarves, eagles, and a rather tough skin-changer were able to prevail.
He lights up pinecones and throws them at the wargs. Some of them caught fire and were afraid of it. But the goblins took the fire and spread it to the trees they were hiding in.
No, the goblins did not get Gandalf. Bilbo's yell when he discovered the goblins stealing things was enough to prevent him from being captured. Gandalf killed a number of the goblins with a big flash of lightening.
When Bilbo, the dwarves, and Gandalf were trapped up in fir trees with wargs (evil wolves) and goblins beneath them, the eagles (including the Lord of the Eagles) swept down from the mountains and carried the Company to safety in their eyries.
The arrival of the eagles was a major turning point in the Battle of the Five Armies. They threw down the goblins from the heights. However, even with the Eagles the battle would have gone ill. The actual saving grace of the three armies was the arrival of Beorn in his bear form. The book describes him as tossing orcs and wargs aside like straw. He also killed Bolg and his bodyguard. With this loss, the goblins were toast.
Gandalf made sure to make the dwarfs think that their voice is one and the same with his.
The Dwarves, Bilbo, and Gandalf were trapped in the goblin town. Read the book!
Gandalf
In the book the Hobbit they do speak.
His amazing fireworks.
No, the goblins did not get Gandalf. Bilbo's yell when he discovered the goblins stealing things was enough to prevent him from being captured. Gandalf killed a number of the goblins with a big flash of lightening.
When Bilbo, the dwarves, and Gandalf were trapped up in fir trees with wargs (evil wolves) and goblins beneath them, the eagles (including the Lord of the Eagles) swept down from the mountains and carried the Company to safety in their eyries.
The book starts with Bilbo Baggins meeting Gandalf the Grey. There was a tea party that Gandalf arranged, pulling in 13 dwarves with him.
Both The Hobbit and The Lord of the Rings include Gandalf as a major character, but Gandalf existed during Tolkien's other books as well.
The arrival of the eagles was a major turning point in the Battle of the Five Armies. They threw down the goblins from the heights. However, even with the Eagles the battle would have gone ill. The actual saving grace of the three armies was the arrival of Beorn in his bear form. The book describes him as tossing orcs and wargs aside like straw. He also killed Bolg and his bodyguard. With this loss, the goblins were toast.
Gandalf made sure to make the dwarfs think that their voice is one and the same with his.
With Gandalf and the dwarf Thorin Oakenshield, and his company of twelve further dwarves.
The Dwarves, Bilbo, and Gandalf were trapped in the goblin town. Read the book!
Gandalf's first action in The Hobbit is to show up on Bilbo's doorstep, and get invited for tea. He shows up a bit late, having told a few dwarves looking for a burgler to stop by as well. These dwarves, at Gandalf's advice, hire Bilbo for the position. Gandalf then accompanies them for a part of their journey. While with the dwarves and Bilbo, he saves them from three angry trolls and rescues them from the goblins of the mountains. With this accomplished, and the dwarves well on their way to their destination, Gandalf leaves them to go do something else that needs doing. Gandalf left the dwarves, in fact, to go and deal with an evil power growing in the south of Mirkwood Forest. This power is referred to as the Necromancer in The Hobbit, and turns out in the sequel to be the dark lord Sauron, who held Middle Earth in terror for a thousand years. Gandalf, and a few wizard friends, successfully drives the Necromancer/Sauron from Mirkwood. Since their foe simply pretended to flee and then sent a few henchmen to take it back, the action wasn't really all that useful, but it's the thought that counts. This done, Gandalf returns to the dwarves, and is there in time to warn them of an approaching goblin army. After the goblins are defeated, Gandalf guides Bilbo the hobbit back home, and goes off to do whatever wizards do.