The Fir Park striker headed home at the end of a counter-attack to draw his side level on points with sixth-placed Hibs and narrow the gap on their fourth-placed visitors to four points.
John Sutton had put the hosts ahead midway through the first half with United temporarily down to 10 men as Garry Kenneth received treatment, but Francisco Sandaza had equalised five minutes after being introduced as a half-time substitute.
Dundee United manager Craig Levein made four changes with Warren Feeney, Jon Daly, James Wesolowski and Garry Kenneth all staring. Craig Conway, Sandaza and David Robertson, who all started the 1-0 win at Falkirk 11 days earlier, all dropped to the bench.
Manager of the month Mark McGhee brought Paul Quinn back into the home line-up following his return from suspension, but in midfield rather than his regular right-back berth, while striker Clarkson dropped to the bench.
John Sutton had the first effort of the game after two minutes when he lifted a shot narrowly wide of the left-hand post.
United captain Lee Wilkie had an even better opportunity minutes later, heading agonisingly over the crossbar from close range after Feeney teed him up from a Paul Caddis cross.
Quinn headed wide in a lively opening and Cillian Sheridan was only prevented from opening the scoring after 13 minutes by a good block from Lukasz Zaluska, who got down at the left-hand post to stop the Motherwell striker's diagonal effort.
United defender Garry Kenneth was forced to go off for treatment to a head knock midway through the first half - and while the visitors were down to 10 men, Motherwell took the lead.
Jim O'Brien nicely controlled a crossfield pass out to the left wing and then sent an acute-angled cross into the box, and Sutton took advantage of the gap in the depleted defence to coolly turn the ball home near the opposite post.
O'Brien then booted the ball wildly over the crossbar after neat footwork by Sheridan - but Sheridan had a glorious opportunity to make it 2-0 seven minutes from the break.
The loan striker ran through the opposition half and, after delaying as the United back four converged around him, shot from the edge of the area, but with the home fans on their feet, Kenneth raced back to clear it off the unguarded line.
Levein brought on Swanson and Sandaza at the interval for Buaben and Jon Daly respectively - and Sandaza equalised within five minutes.
Feeney's fizzing cross had been turned out for a corner which was sent in from the left by Paul Caddis, and although the ball was initially blocked in a crowded penalty area, it fell for the substitute to bundle home at the opposite post.
Defender Brian McLean could have restored his side's lead shortly afterwards when he well positioned almost on the line to meet a Steven Hammell corner, but somehow contrived to put his effort over the crossbar.
Swanson almost joined his fellow substitute on the scoresheet just after the hour mark with a magnificent long-range volley which home goalkeeper Smith matched with an equally impressive save.
McLean then had another opportunity, this time from an O'Brien corner, but headed over.
Motherwell regained the lead 15 minutes from time from a swift counter-attack after Maros Klimpl challenged Swanson on the edge of the United box, and with the visiting player grounded, set off upfield.
The ball was passed through Stephen Hughes and out to O'Brien on the left; he crossed back into the centre for substitute David Clarkson, who first headed the ball up and then nodded a looping header past Zaluska and into the net.
Sutton could have put the game beyond doubt from another well-worked move five minutes later but rolled his shot inches wide of the left-hand upright.
Motherwell had to defend two injury-time corners but kept out Swanson's flighted deliveries.