Aberdeen ended a run of three consecutive defeats to give themselves a boost ahead of next weekend's Scottish Cup semi-final.
Darren Mackie ended their run of three games without a goal by chipping over Dusan Pernis after eight minutes.
Dundee United skipper Jon Daly volleyed in his 21st goal of the season to equalise after 29 minutes.
But Chris Clark pounced on a Pernis error after 68 minutes and Ryan Jack headed in 10 minutes later.
Jack and Stephen Hughes were passed fit to start, so Kari Arnason and Peter Pawlett dropped to the bench.
Dundee United were unchanged as they looked to record their seventh consecutive league win.
Daly celebrates his 21st goal of the season
United had a strong appeal for a penalty turned down after only eight minutes when Clark Robertson looked to have tripped midfielder Scott Robertson in the box, but referee Calum Murray waved play on.
The home side took full advantage of that decision going in their favour by opening the scoring four minutes later when Mackie showed great skill to dink the ball over Pernis.
John Rankin curled the ball over the crossbar from the edge of the area after 22 minutes as the visitors tried to get back on level terms.
United almost gifted Aberdeen a second when Willo Flood's careless back pass went straight to Hughes, but the former Motherwell midfielder's powerful shot was turned wide by Pernis.
Flood recovered from that mistake to supply the corner that fell to the unmarked Daly, who smashed the ball on the volley low past Aberdeen goalkeeper Jason Brown.
The Dons had a chance to regain their advantage just before the break when Clark's deep cross picked out Mackie, but the striker was unable to direct his header on target.
Clark was the man to benefit when the normally reliable Pernis fumbled a harmless cross and the Dons midfielder rolled the ball into the empty net.
As United pressed forward, the Dons squandered a chance to put the game beyond their opponents when Jack broke clear and found Mackie, who rolled the ball into the path of Scott Vernon only for the striker to delay his shot and allow the ball to be cleared.
But Aberdeen did go further ahead when Jack rose to powerfully head home a Clark cross.
There was still time for Jack to fire into the side-netting on the break as the Dons looked to extend their lead.
Aberdeen manager Craig Brown:
"I thought the first 20 minutes and the last half an hour were as well as we have played this season against arguably the best team in the country at the moment.
"I have got to admit that I think we were fortunate for the second goal. We got the breaks, although our goalkeeper didn't have a save to make during the match.
"I have been saying that quite often but today we managed to score at the other end which made the difference.
"I was pleased with the whole team and I won't single anyone out. The players were up for the fixture and it gives us a major selection problem for next week (Scottish Cup semi-final), which is a very good problem to have."
Dundee United manager Peter Houston:
"It was an off day but there were pivotal moments that could have changed the match.
"In the first half I thought we were denied a stonewall penalty and I just don't understand the reason the officials gave our players when they told them it was an accident.
"I think most fouls are accidents with players just going in too late, but on this occasion he clipped his heels as he was about to shoot so I thought we were denied a stonewall penalty.
"Secondly, Dusan Pernis, who has been great for us, made an uncharacteristic error in giving them a tap-in.
"I'm frustrated and annoyed and I know the players will be as well as we have set ourselves high standards because of the run we are on."
- 32 Brown
- 02 McArdle
- 03 Reynolds
- 06 Considine Booked (Anderson - 55' )
- 13 Robertson
- 07 Clark Booked
- 20 Hughes (Arnason - 74' )
- 22 Jack
- 28 Rae
- 09 Vernon
- 10 Mackie Booked (Fyvie - 84' )
- 01 Langfield
- 27 Anderson
- 11 Arnason
- 17 Fyvie
- 14 Fallon
- 21 Magennis
- 23 Megginson
- 01 Pernis
- 02 Dillon
- 03 Dixon
- 18 Gunning
- 26 Neilson
- 06 Flood (Armstrong - 71' )
- 08 Robertson (Ryan - 80' )
- 11 Rankin
- 17 Mackay-Steven (Swanson - 71' )
- 09 Daly
- 15 Russell
- 13 Banks
- 05 Kenneth
- 12 Watson
- 14 Douglas
- 07 Ryan
- 10 Swanson
- 16 Armstrong