For all their first-half supremacy the Dons went in at half-time all square, having squandered enough chances to put the game out of sight.
The Dons came closest to scoring on 16 minutes when a Jamie Smith corner kick saw Russell Anderson climb above his marker only to head just wide of the upright.
In 32 minutes Michael Hart's surging run took him beyond Jamie Paterson to the by-line where his driven cross found the head of Steve Lovell, whose header crashed off the crossbar.
The Dons finally made the breakthrough in 56 minutes when slick passing between Lee Miller and Chris Clark saw the ball slip through to Smith who side-footed the ball beyond Colin Meldrum.
The Dons conceded an absolute howler of an equaliser on 60 minutes when Hart challenged Clarkson playing the ball back to his keeper. Jamie Langfield failed to gather the ball and it trundled into the unguarded net.
Aberdeen took until the last few minutes before getting the vital second goal. A Clark cross-shot cross into the six-yard box was turned into the net by Miller, with the Well defenders forlornly appealing for offside.