Montrose came within minutes of creating a shock before Queens conjured up a victory in extra-time.
The League 2 side had led from midway through the first-half when Terry Masson fired them in front. However, Stephen Dobbie spared the Championship team’s blushes with a late leveller before Lyndon Dykes and Dobbie again scored in overtime.
Montrose started well, Masson and Connor McLaren going close.
Queens responded through a Dobbie effort which was blocked, while a Chris Kane volley was too close to Allan Fleming.
The opener came at the other end when Masson fastened on to a loose ball and buried his shot behind Alan Martin.
Queens stepped-up the pressure after the break but their efforts continued to be repelled.
However, Montrose’s resistance was broken when they failed to deal with a deep cross and Dobbie pounced to take the tie into extra-time.
And home hearts were broken when Dykes sprang the offside trap to beat Fleming before Dobbie squeezed another in from the tightest of angles.