Burton O'Brien rescued a point for Livingston with a stoppage-time equaliser at Almondvale.
Davie Preece pushed out a header from Fernando Pasquinelli but O'Brien was alert to lash home the equaliser.
Until then it looked as if Aberdeen would hold onto the three points after Scott Booth fired them ahead midway through the first half.
The home side looked disjointed in comparison but Pasquinelli had the best early effort when he wriggled across the penalty area before lashing a shot narrowly over David Preece's crossbar.
If that was a narrow escape, Livingston had a remarkable let-off in the 21st minute after their usually reliable skipper Stuart Lovell misdirected a header.
The eager Aberdeen forwards were not slow to pounce. Roddy McKenzie had to produce a one-handed save to block Steve Tosh's shot but could only divert it to Leigh Hinds and his net-bound shot was headed off the line by Emmanuel Dorado.
Before Livingston had time to celebrate their good fortune, Aberdeen had moved in front.
Marvin Andrews was caught loitering in his own penalty area when Scott Muirhead swept over a cross more in hope than expectation.
Booth was alert to it and had the luxury of time in the area to pick his spot. He did so with a carefully-guided right-foot shot that curled around McKenzie.
Livingston had their moments after that but Preece remained untroubled and he was well protected by Russell Anderson and Kevin Rutkiewicz.
Derek Lilley should have done better shortly before the break when the ball fell to him on the edge of the area but his shot was at least a couple of yards wide.
The second half followed a similar pattern. Livingston built patiently but lacked the directness Aberdeen showed.
Lovell clipped a shot inches wide of the far post after David McNamee had broken with menace down the right.
It was an engrossing game even if neither goalkeeper was overworked and Aberdeen looked determined to underline their recent improvement.
Pasquinelli forced a brilliant save from Preece in the 66th minute with a volley and then was unlucky to see a lob drift just inches wide of the post.
But Livingston got their reward when O'Brien grabbed a last-gasp equaliser.