In a season best forgotten by the Dons faithful, Aberdeen boss Steve Paterson was forced to give youth players Kevin Souter and Andrew Considine their first starts for the home side as the Pittodrie injury crisis stretched resources to the limit.
Dundee's two-goal midweek hero Nacho Novo failed to recover from an ankle injury in what was likely to have been his last game in a dark blue jersey.
In the sixth minute a loose pass by Considine was picked up by Chris Hegarty who quickly played the ball into the path of Steve Lovell. He advanced to the edge of the penalty area before clipping a shot on to the roof of the net.
Aberdeen's response was immediate as they opened the scoring in the seventh minutes. A mistake at the centre of the Dee defence allowed John Stewart a clear run on goal. His effort was brilliantly parried by Derek Soutar but the ball fell to Richard Foster who scored his first goal for the first team.
Minutes later Hegarty accepted a pass from Steve Milne inside the Dons box but from ten yards out screwed his effort wide of the post.
In the 20th minute the home side nearly extended their lead when Paul Sheerin's cross from the left found the head of Stewart but his header from eight yards went just the wrong side of the upright.
Foster and Souter combined well in midfield before the latter tested Dundee keeper Soutar with a fierce 22-yard effort on 32 minutes.
Dundee went close to an equaliser on 49 minutes when Lovell and Milne broke clear in midfield. Milne took advantage of slack play in the centre of the Dons defence to race through on goal, rounded Ryan Esson, but then from an acute angle Scott Morrison got back to block his effort at the expense of a fruitless corner.
Poor control by Markus Heikkinen inside his own box presented Lovell with an unexpected opportunity which the big striker completely messed up, shooting harmlessly straight at Esson.
It didn't appear to be Lovell's day as he again passed up a great chance when played in by Garry Brady but from 16 yards and with the goal at his mercy he again failed to hit the target.
Aberdeen youngster Stewart was next to try his luck as the game opened up. However, his 25-yard effort flew way over the crossbar.
Midway through the second half Aberdeen replaced Heikkinen with David Donald who became at 16 and a half the youngest player ever to play for the home side.
Dundee's second-half pressure finally paid off in the 73rd minute when Brent Sancho knocked a Brady corner into the path of Milne for the easiest of tasks to slam the ball home from six yards.
Dundee were now scenting victory and all three points when a Milne cross found the head of Sebastian Kneissl but Esson produced a miraculous one-handed save at his left-hand post.
With five minutes left Aberdeen looked to have regained the lead when second-half substitute Bryan Prunty brilliantly turned away from Sancho before picking out Sheerin with his cross. The Dons skipper's header flashed off the face of the crossbar, with Stewart following in to head the rebound just over.
For the second week running the young home side were given a cruel lesson in the harsh realities of SPL football as they again conceded a last-minute goal to deprive them of a share of the spoils which their effort and endeavour had deserved.
Lovell put them to the sword when he latched on to a flicked throughball from Milne to smash the ball home and secure all three points.