Gandalf likely didn't have a specific plan in mind
He certainly wanted Smaug dead, but his version of the story suggests he was just following his gut, and things just kind of worked out for him1. The most relevant bit of writing comes from Unfinished Tales:
I promised to help [Thorin] if I could. I was as eager as he was to see the end of Smaug, but Thorin was all for plans of battle and war, as if he were really King Thorin the Second, and I could see no hope in that. So I left him and went off to the Shire, and picked up the threads of news. It was a strange business. I did no more than follow the lead of 'chance,' and made many mistakes on the way.
Suddenly in my mind these three things came together: the great Dragon with his lust, and his keen hearing and scent; the sturdy heavy-booted Dwarves with their old burning grudge; and the quick, soft-footed Hobbit, sick at heart (I guessed) for a sight of the wide world.
The existence of a secret door, only discoverable by Dwarves, made it seem at least possible to find out something of the Dragon's doings, perhaps even to recover some gold, or some heirloom to ease [Thorin's] heart's longings.
"But that was not enough for me. I knew in my heart that Bilbo must go with him, or the whole quest would be a failure - or, as I should say now, the far more important events by the way would not come to pass.
Unfinished Tales Part III: "The Third Age" Chapter 3: "The Quest of Erebor"
Whether or not Gandalf had a glimpse of the future when making this plan is dealt with elsewhere on the site.
1 We might, and I suspect Tolkien would, consider this an act of Providence