It was not his job.
The Istari (wizards) were sent to Middle Earth to oppose Sauron, but to do so by stirring the free people's of Middle Earth to resistance. They were explicitly forbidden from "Matching Sauron's power with power".
While Smaug was not Sauron, and so one could argue that technically he did not fall under the ban, the reason for the ban was still important - when the great Powers of the world clashed, there was normally a lot of collateral damage. Nearby things get destroyed - little things like towns, cities, mountain ranges, and continents. While it's unlikely that Gandalf's confrontation with Smaug would have done damage on that level, it could still have destroyed Lake Town and potentially the elf-kingdom of Mirkwood.
That said, I don't think that would have been enough to stop Gandalf from just doing the job himself if he had to. If it had really come to it, I'm sure Gandalf could and would have destroyed Smaug, especially in defence of others. But...
The destruction of the dragon would be only half the job. Gandalf needed not only Smaug gone, but a stronghold of free peoples reestablished. Had Gandalf simply turned up and destroyed the dragon, the dwarf-hoard would have remained there unguarded, almost certainly to become a source of terrible strife among the people in the north. This is covered in Appendix A of Lord of the Rings:
Among many cares he was troubled in mind by the perilous state of the North; because he knew then already that Sauron was plotting war, and intended, as soon as he felt strong enough, to attack Rivendell. But to resist any attempt from the East to regain the lands of Angmar and the northern passes in the mountains there were now only the Dwarves of the Iron Hills. And beyond them lay the desolation of the Dragon. The Dragon Sauron might use with terrible effect.
Despite all of which, if it had come to it, Gandalf likely would have been able to fight and destroy Smaug, if there had been no other choice. But as it happened, while he was trying to decide what to do about the dragon, he had a 'chance' encounter. In the same appendix:
It was even as Gandalf sat and pondered this [in the Inn at Bree] that Thorin stood before him, and said: 'Master Gandalf, I know you only by sight, but now I should be glad to speak with you. For you have often come into my thoughts of late, as if I were bidden to seek you. Indeed I should have done so, if I had known where to find you.'
Gandalf looked at him with wonder. 'That is strange, Thorn Oakenshield,' he said. 'For I have thought of you also; and though I am on my way to the Shire, it was in my mind that is the way also to your halls.'
[...]
'...You would be welcome there, if you would come. For they say that you are wise and know more than any other what goes on in the world...'
'I will come,' said Gandalf; 'for I guess that we share one trouble at least. The Dragon of Erebor is on my mind, and I do not think that he will be forgotten by the grandson of Thror.'
[...]
...But Dain Ironfoot...became then King Dain II, and the Kingdom under the Mountain was restored, even as Gandalf had desired. Dain proved a great and wise king, and the Dwarves prospered and grew strong again in his day.
This was Gandalf's job - not to kill all the various nasties of the world, but to support and strengthen the free peoples of Middle Earth to resist Sauron. If in the end he was left no other choice - as when he faced the Balrog - he could have destroyed Smaug; but as it turned out, doing so would have weakened the Free Peoples. Because...
...with his far-stretched right hand Sauron might have done great evil in the North, if King Dain and King Brand had not stood in his path.