Barry Robson made one change to the side that came from behind to defeat Queen's Park in the cup last week, as Kai Watson came back into the defence, with Finlay Murray making way.
The clash began at a high tempo and remained that way for the 90 minutes, Brendan Hamilton conceded a free kick in the first few minutes after a strong challenge, but the dead ball was poor and straight into the arms of Blessing Oluyemi.
The young Dons created an abundance of chances early on, Alfie Stewart glanced a shot over the bar and the running of Findlay Marshall midfield was causing issues for the visiting defence.
So, it was against the run of play when Rangers struck first in the encounter. Findlay Curtis on the turn was able to power a shot high and across Oluyemi and into the back of his net on the 20-minute mark, a very good finish.
Aberdeen responded well, Alfie Bavidge set up Adam Emslie, but his low effort was saved and put behind for a corner.
After a quieter spell going forward, Liam Harvey played through the energetic Marshall who was taken down by Ranger's Kristian Webster on the edge of the box.
Alfie Stewart stepped up to take the free kick and it was his smart thinking that earned his side the equaliser, catching the Rangers defence and keeper off guard ? who were preparing for a cross into the box, his shot snuck in at the near post, and just like that, the young Dons were level. 1-1.
A brilliant piece of work from Alfie.
Adam Emslie looked very bright as Aberdeen pushed for a second goal before the interval. This time it was his turn to play provider, setting up Bavidge, unfortunately his effort was just pushed wide.
That was to be the last chance of an entertaining 45 minutes of football, and the two teams went in level at half time.
HT: Aberdeen 1-1 Rangers.
Aberdeen came out for the second half looking dangerous, creating an abundance of chances. Bavidge had the ball in the back of the net at the back post after some great link up play involving Hamilton and Emslie, but perhaps controversially the linesmen's flag went up. Liam Harvey was in an offside position but was not interfering with play. The quality of the cross from Hamilton deserved a goal.
As the young Dons continued to push the visiting team had a couple of chances on the break, Curtis had a go but saw it sail wide and before that Blessing Oluyemi produced a superb save, somehow scooping the ball away after managing to change direction whilst diving.
Liam Harvey then passed up on a couple chances in quick succession after making a couple of great runs, first shooting off target and then into the side netting. The young centre forward was replaced after 64 minutes by Lewis Pirie, fresh from his winner in the cup last week.
Adam Emslie then went close on a couple of occasions, there were also a number of crosses which would just not fall for a red shirt. A frustrating period.
Rangers, who are coached by former Don Steven Smith, were defending well to be fair, the keeper made a couple of decent saves and they still carried a threat on the break.
It was a really good game.
With just over 15 minutes remaining Aberdeen had a strong claim for a penalty turned down by the referee after the recently introduced substitute Christian Mulindwa appeared to handle the ball, but despite strong protests play continued.
A couple minutes later Aberdeen had another tight call go against them when Pirie coolly slotted the ball in the back of the net after a well timed run, again it was judged to have been offside, and the score remained level.
With 10 minutes left Aberdeen were really pushing hard for a winner but it seemed like despite their best efforts it wasn't going to be their day. Marshall hit the side netting from close range, Rangers were just about managing to survive wave after wave of Dons attack.
And then, as the game approached stoppage time captain Dylan Lobban, who had an outstanding game, had a go from the edge of the area, his shot could only be palmed back out into the six-yard box by Samuel Kane in the Rangers goal, and it was none other than Alfie Bavidge who was waiting in the wings to pounce.
After what seemed like an eternity as the ball came back out to the prolific striker, Bavidge knocked the ball over the line to give Aberdeen the lead, sparking emphatic celebrations from a side who left everything on the pitch to claim the three points.
The persistence had paid off and for the first time in the match Aberdeen had their noses in front. The young Dons expertly navigated the remaining few minutes of stoppage time, and by the full time whistle they were able to celebrate another well-deserved victory.
STATS