In a back-and-forth contest, it was honours even heading into the interval following a Calum Adamson header and a Callum Burnside strike.
The League Two outfit got their noses in front early in the second half but were quickly pegged back when Burnside struck for the second time on the evening from a well-weighted Zebedee Lawson pass.
However, the hosts prevailed when Myles Gaffney slammed home with 18 minutes remaining as the Light Blues now shift their attention to the penultimate fixture in this competition with a trip to face Dumbarton next month.
Stevie Smith made several changes to his young side from the previous outing in the competition, with Bailey Rice and Josh Gentles in from the off.
It was a crisp evening not far from the border as the Gers were hungry to pick up their first points in the league phase after a disappointing start to the competition.
However, it was Annan who were on the front foot early as the combination of Aidan Smith and Max Kilsby were causing alarm with a sequence of deep crosses.
Indeed, the second of which in the early exchanges almost led to the opener before Rangers fell behind, not against the run of play, when a header was cleared only as far as Paul Smith and the midfielder dispatched an unerring half-volley on his left side beyond Rydnn McGuire and into the far corner.
Rangers would have been forgiven for licking their wounds after the early concession, but they offered an immediate riposte from a pinpoint Burnside corner in which Adamson rose highest to nod a terrific header goalwards that Gio Clarke couldn’t keep out.
Adamson’s evening, however, was cut short five minutes later when he took a thunderous clearance to his face, which forced the introduction of Alex Smith in the midfielder’s place.
Down the opposite end, it was Zander Craik who headed straight at McGuire after Kilsby, again, picked out a delicious delivery from the left-hand side.
The first half sparked back into life moments later when Annan bundled the ball past McGuire from a corner and had their celebrations swiftly cut short by the referee, who spotted an infringement on the Rangers goalkeeper.
The visitors wasted precious little time in restarting play, releasing Lewis Stewart, running from his own half, in-behind with only the goalkeeper to beat before the winger laid the ball across for Burnside to slot home into an empty net.
For the first time in the competition, it was the Gers who were ahead in the contest, and they sought to extend their advantage when Smith moved possession onto Rice, who chopped back onto his right foot at the edge of the penalty and curled into the grateful arms of Clarke.
It look for all intents and purposes that Smith’s young side would head into the half-time interval with the advantage, but the hosts struck in first half stoppage time when they pounced quickly from a throw-in and laid the ball on a plate for Craik, who provided the finishing touch from close-range.
The leveller shifted the momentum back in Annan’s favour as the two sides emerged for the second half as Aidan Smith was thwarted before Myles Gaffney shot wide from the edge of the penalty area.
And it wasn’t long before the home side restored their advantage as they went route one in their approach and muscled their way through the Gers rearguard, where Smith had the time and space to dispatch beyond McGuire.
Alex Smith tried his luck minutes later in an attempt to haul Rangers back level, requiring Clarke in the Anan goal to be at full stretch to tip the midfielder’s curling effort around for a corner.
Changes were afoot with 25 minutes remaining as Lawson, signed from Brighton & Hove Albion last week, made his Under-19s debut, with Kyle Glasgow and Cormac Christie also entering the fray.
It was an instant impact from Lawson in Rangers colours as the exciting winger lifted his head with space in midfield and poked a delightful pass through to Burnside, who wrapped his foot around his finish to slam beyond Clarke for the second time on the evening.
Any momentum that Rangers generated was short-lived, however, as Annan went ahead for the third time in the contest when Gaffney slammed home first-time from a pull-back on the left-hand side.
The hosts almost extended their advantage three minutes later to cap off a manic five minutes when Paul Smith went down inside the penalty area and was duly awarded a spot-kick.
Aidan Smith was the man to take for the home side, but he was denied by a sprawling save from McGuire to keep Rangers alive in the bout heading into the final quarter of an hour.
Christie looked set to be released in-behind by the impressive Lawson, but for an excellent interception as time eventually ran out on the young Gers' attempts to find a dramatic late equaliser.
RANGERS: McGuire, B. Hutton, Kerr, Campbell, Wark (Scally, 76), McCallion, Rice (Christie, 64), Adamson (Smith, 13), Stewart (Lawson, 64), Burnside, Gentles (Glasgow, 64)
Subs not used: S. Reid, J. Reid, Cameron, Crilly
ANNAN ATHLETIC: Clarke, Hooper (Muir, 70), Kilsby, McGowan, Smith, Gaffney, Muir, Smith, Craik (Kalala, 72), Maxwell, Gibson
Subs not used: Balfour, Bell
2025-26 AWAY KIT: Follow Forever. Shop the 2025-26 Umbro x Rangers Away Kit in-store or online HERE
GET YOUR 2025-26 MYGERS MEMBERSHIP: Enjoy exclusive experiences, discounts and events with a MyGers membership HERE
VIP HOSPITALITY: Combining all the passion, excitement and joy of football with an unrivalled choice of suites and packages at Ibrox Stadium HERE