Following eight straight wins in the league without conceding a goal, Aberdeen’s draw means their lead at the top is cut to two points with Celtic – who beat Hamilton 2-0 earlier on Saturday – having played two matches fewer.
Gary Irvine, Greg Stewart and Gary Harkins all scored in a 10-minutes spell either side of the break for Dundee after David Goodwillie had given Aberdeen an early lead.
And in a dramatic finale Jonny Hayes and Ross Jack struck for the Dons to earn an unlikely share of the points with a late double.
The Dons had the first chance after only three minutes when Mark Reynolds forced Scott Bain into a decent save from a Niall McGinn corner.
But just four minutes later Dundee defender Irvine was dispossessed by McGinn, who sent Adam Rooney clear and his delivery into the box was finished from close-range by Goodwillie.
Midway through the opening half Dundee were opened up again when Goodwillie burst into the box and set up Hayes whose shot was blocked by a defender and the ball broke to Rooney who lifted his effort over the bar from three yards.
Irvine (38) atoned for his earlier mistake as he weaved into the Aberdeen box and crashed his shot past Scott Brown after Harkins and Stewart combined to set up the chance.
Two minutes later Aberdeen were stunned again when Stewart exchanged passes with Luka Tankulic and finished with great composure.
Aberdeen squandered another chance in the early stages of the second half when Peter Pawlett burst into the box and laid the ball back to Rooney, but his shot hit the upright.
And the Dons paid the price seconds later when a low delivery into the box from a Dundee free-kick was knocked in front of Harkins (48) and he drove his shot across Brown into the corner.
Aberdeen were almost caught on the counter-attack just before the hour when Stewart ran at last-man Ash Taylor and got his shot away, but Brown got down to hold the ball.
Dundee then survived a scare on 76 minutes when substitute Willo Flood’s shot broke off a defender at a corner and spun across the box, but the visitors cleared the danger.
With just six minutes remaining Goodwillie swept a drive past Bain, but Kostadin Gadzhalov cleared the ball off the line.
But three minutes from time Hayes squeezed his penalty past Bain after Gadzhalov was adjudged to have tripped substitute Lawrence Shankland
Logan then delivered the ball into the penalty area in stoppage-time and it was flicked into the path of Jack to fire home for a dramatic finish.