Dumbarton were left to look back on a string of missed chances as Stephen Canning hit the winner for the Hampden men against the run of play.
The match started at a high tempo and both sides almost netted in the opening 15 minutes of the match. It was Queens who went close after 10 minutes when Canning sent in a fine dipping effort from 25-yards, but his effort landed on the roof of the net.
Then the visitors were denied by the woodwork minutes later as Craig Winter saw his curling 25-yard effort come back off the crossbar with Queens goalie David Crawford beaten.
Dumbarton were enjoying a fine passage of play and former Hibs striker Stephen Dobbie fired wide from just outside the area. Dobbie went close once more on the half hour mark as he rose above the home defence to get his head to Ryan Borris's cross, but Crawford did well to tip the ball over the bar for a corner kick.
Dobbie continued to pose problems after the break and he fired straight at Crawford from 8 yards before seeing a fine 20 yard chip tipped over the bar for a corner.
The visitors failed to turn their superiority into goals and they were caught with a sucker punch as Canning fired home the winning goal from Paul Ronald's cutback