Scott McDonald gave the visitors a surprise lead but the Dons hit back with two goals at the start of the second half from Ash Taylor and Adam Rooney, who grabbed his 24th goal of the season.
The win moves Aberdeen within three points of leaders Celtic, who have a game in hand, while ‘Well stay one place off the bottom.
Aberdeen began well and should have tested ‘keeper George Long when Ryan Jack found some space but he blazed his shot over, before the same player tried his luck from long range a few minutes later which was saved.
Motherwell gradually found their rhythm and spurned a couple of decent opportunities with Ross McLean firing an effort over from 15 yards, while Lee Erwin also failed to find the target from inside the box after a sublime through ball from Conor Grant.
Erwin was then denied on the half hour mark by a great save by Jamie Langfield who raced off his line to block the striker’s effort.
But Langfield could no nothing to stop the visitors taking the lead on 37 minutes when Erwin’s low strike from 25 yards was diverted into the net by McDonald, the seventh match in a row he has scored against the Dons.
Aberdeen came agonisingly close to an equaliser when Niall McGinn’s cross from the right found Kenny McLean but his header was saved sharply by Long.
The Dons regrouped at the break and made an explosive start to the second half where they scored two goals in two minutes.
From a corner Taylor rose highest to head in the equaliser, before Rooney capitalised on a wayward header from Louis Laing, which went past his own keeper, to edge the Dons in front.
Ian Baraclough’s side came close to an instant response with McDonald’s shot well saved by Langfield.
But the Dons dominated the rest of the half and went close to scoring a third when McGinn went on a mazy run from the halfway line and fired a 25-yard effort that whistled past the post.
Peter Pawlett then tested Long with a long-range effort which the keeper saved while Well’s last chance of the game fell to Lionel Ainsworth in the 88th minute but his first-time effort went inches wide.
But Derek McInnes’ side was able to hold on for a vital victory in their bid to keep the pressure on Celtic, who are not in league action this weekend as they face Dundee United in the Scottish League Cup final on Sunday.