Just as he was when the Light Blues won the League Cup against Dundee United in March, Kris Boyd was the man whose goals made the difference.
He gave his side the lead, which was then added to by DaMarcus Beasley, before Queens scored two quick goals early in the second half to draw level again.
Gers weren’t to be denied, however, and Boyd struck again 20 minutes from the end to make sure the trophy would head back to Ibrox for the 32nd time.
Walter Smith’s men went into this game just 41 hours after their shattering 2-0 loss to Aberdeen, a result which spelled the end of their SPL title dream.
Despite having so little time to prepare, they were still expected to see off their First Division opponents.
Manager Smith chose an attacking line-up, with Boyd and Jean-Claude Darcheville – who scored three goals between them at St Mirren on Monday – paired in attack.
Beasley was a surprise inclusion and he made his first start since he suffered serious knee damage in a Champions League tie with Stuttgart in November.
Sasa Papac also featured after missing the last three games of the league campaign with a thigh strain.
Steven Davis and Christian Dailly dropped to the bench while Charlie Adam, Brahim Hemdani, Kirk Broadfoot and Daniel Cousin were omitted altogether.
Lee McCulloch was keen to make an impression but made the wrong kind of start, earning a booking just four minutes in for an over-enthusiastic tackle on Robert Harris.
That was the standout incident in an otherwise low-key opening period and it took Gers some time to get going after their disappointment at Pittodrie.
Indeed, it was midway through the first half before McCulloch’s snap-shot was blocked by Steve Tosh, with Kevin Thomson firing the rebound wide from 25 yards.
Beasley then had a go after Boyd and Darcheville combined to set him up but his effort was poor after he forged his way into the box.
The Light Blues were starting to come forward with far more purpose and Boyd was unlucky to see his stooping header from a Beasley cross sail a yard too high.
Papac’s long-range effort moments later appeared to be on target but it was nodded behind by Neil MacFarlane and at that point, Gers were becoming more dominant.
A goal looked to be on the cards and sure enough, after 33 minutes, it came in some style from Boyd.
Tosh was penalised for a late foul on Beasley and with a free kick 25 yards from goal, Smith’s men had a chance.
Barry Ferguson rolled it to Boyd and the former Kilmarnock hitman’s rocket shot soared into the net to give his side a deserved advantage.
Taking a lead gave Rangers confidence and they set about trying to extend it, doing so three minutes before the break.
Beasley had been the best player in white, looking lively and hungry after so long on the sidelines, and he found David Weir with a corner but his header was cleared.
Carlos Cuellar knocked the loose ball back in, however, and when he found the American winger, he knocked in his fifth goal of the season at the back post.
Finding themselves 2-0 up, Gers were cruising at the midway point but an awful start to the second half led to Queens drawing level within seven minutes.
Tosh gave the Doonhamers hope when he scrambled the ball home after good work on the right by Sean O’Connor took him past Cuellar and allowed him to cross.
Even at that stage, Dumfries captain Jim Thomson’s equaliser was unexpected but he headed in Harris’ deep free kick from the right to make it 2-2.
In clear disarray, Gers were rattled and they tried to turn the screw but Cuellar’s tame header was easily held by Jamie McDonald.
Beasley then broke clear and found Ferguson but the ball got caught under his feet and when he did eventually get a shot in, it bobbled into the keeper’s arms.
The 35,000 Light Blues fans who had followed their side to Hampden were getting agitated but they didn’t get much of a response at first.
Passes were going astray and moves kept breaking down as the SPL team failed to find any sort of rhythm.
Beasley had a chance when Darcheville crossed low to him but he held play up instead of shooting and Queens forced the ball away.
Papac then mishit a shot from eight yards and when Beasley lifted a free kick in, Boyd swung for it and failed to connect.
The pressure was at least beginning to tell on the underdogs and at last, Rangers had something to cheer about when they hauled themselves back in front.
Boyd was the scorer again, getting his 25th club goal of the campaign and sixth of the tournament as he got up to head in Beasley’s inswinging corner.
With Gers leading again, Smith decided it was time to bring off Beasley and as Davis replaced him, John Stewart came on for Queens’ Jamie McQuilken.
Boyd almost got his hat-trick when Davis centred from the right but McDonald made a great stop at his near post to deny him.
Darcheville also came close, sending a header then a blistering drive from 20 yards over the woodwork.
More substitutions followed and among them was the introduction of John Fleck for Frenchman Darcheville.
His appearance made him the youngest person ever to play in a Scottish Cup final at the age of 16 years and 274 days.
He even had a chance to cap his day with a goal, making a great run through the heart of midfield and playing a one-two with Ferguson before his shot was blocked.
The miss ultimately didn’t matter and as referee Stuart Dougal blew for full-time, he ensured a bright end to an incredible season for Gers.
After 68 games, they have still finished the campaign with a cup double and can go into the summer on a relative high despite missing out on the league title.