Former Dons midfielder Ryan Jack cancelled out Bojan Miovski's first-half opener before Anthony Stewart was dismissed late on in regulation time.
Michael Beale's side were made to work by their opponents, but substitute Kemar Roofe ultimately netted the winner four minutes into extra-time to set up a final with rival Celtic on February 26.
In front of a raucous flare-filled Hampden Park crowd, both sides created chances in a thrilling end-to-end first half, but Rangers started the brighter in the opening exchanges and almost scored in just the fourth minute through Fashion Sakala, who crashed a header against the post from inside the penalty area following a well-worked corner routine.
Miovski thought he had put Jim Goodwin's side in front in the 16th minute when he ran in behind and rifled a strike past Allan McGregor, but the Dons forward was caught offside.
Just two minutes later, Anthony Stewart and Duk both took a swing and a miss from close range before Sakala and Malik Tillman combined at the other end, with the former cutting inside and firing just over the crossbar.
Aberdeen grew into the game, forcing Rangers to play on the counter-attack, and Liam Scales and Miovski both directed efforts off target from inside the area just before the half-hour mark.
Alfredo Morelos, making his 250th Rangers appearance, then fired a right-footed shot narrowly wide of the post before Ryan Kent forced Kelle Roos to parry his strike into the path of Sakala who could only slice the rebound well off target.
Morelos came close again in the 37th minute, rising at the far post a directing a header goalwards, but Roos made a crucial save on the goal line before Ylber Ramadani cleared the ball away from danger.
The deadlock was eventually broken five minutes before half time when Rangers were caught napping at the back, assuming Miovski was going to be flagged offside, but Matty Kennedy burst through from an onside position to take the ball before dinking a perfectly weighted cross for Miovski to net his 13th goal of the season.
Rangers dominated possession after the interval, but were unable to create any clear-cut opportunities and groans from the Rangers supporters began to get louder as the time ticked away.
However, those groans turned into cheers in the 61st minute when Morelos teed up Jack on the edge of the area to unleash a deflected strike into the bottom right-corner, restoring parity against his boyhood club.
Aberdeen responded well and almost restored their lead in the 72nd minute, when a shot from Leighton Clarkson rattled against the base of the post, although the goal would not have stood as replays show an offside in the build-up.
It was all Rangers in the final 15 minutes and although Aberdeen were able to hold on for extra-time, they were dealt a major blow in the third-minute off stoppage time as captain Stewart was shown a straight red card for a reckless challenge on Sakala.
That dismissal proved costly as Rangers took the lead for the first time just four minutes into extra time - moments after James Tavernier hit the crossbar - when Scott Wright brilliantly weaved his way towards the byline and cut a cross back to fellow substitute Roofe, who tapped home a first-time finish inside the six-yard box.
Aberdeen were facing an uphill battle a man down, and ffter a brief period without VAR due to technical problems between the on-field officials and the VAR control room, Rangers came close to extending their lead on two occasions, but efforts from Sakala and Wright were off target.
Rangers' victory was dampened slightly after Roofe, who had just returned from injury, was forced off in the closing stages with a shoulder problem.
Nevertheless, the Gers are through to the final where they will bid to lift the Scottish League Cup for the first time since the 2010-11 campaign.