United struck twice in the space of eight minutes through Charlie Telfer and Jaroslaw Fojut to set up victory in a game not short of talking points.
Simon Ramsden pulled a goal back 12 minutes from time, but Telfer completed his brace in the dying seconds to secure the points for United.
The home side felt they should have been awarded a penalty in the opening exchanges when the ball appeared to strike the hand of Motherwell defender Stephen McManus.
Moments later Motherwell were claiming a spot-kick at the other end as Lee Erwin hit the deck as he burst into the box.
Seven minutes before the interval United were denied by Dan Twardzik as the ‘keeper made a fine diving save to keep out a powerful Blair Spittal shot.
And the Motherwell stopper was in action again five minutes later when he was well placed to get behind a firm Stuart Armstrong drive.
Motherwell thought they had taken the lead seconds before the break when Stephen Pearson burst into the box and slipped a pass by the advancing Rado Cierzniak for John Sutton to plod the ball towards the net, but Callum Morris got back to scoop the effort clear.
The visitors were especially aggrieved as referee Craig Thomson appeared to award the goal before changing his mind.
Motherwell had another great chance to open the scoring on 58 minutes when Pearson again caused havoc with a driving run to set up Lionel Watt, but he shot straight at Cierzniak with the goal at his mercy.
United struck the opening goal on 61 minutes when Telfer collected the ball 25 yards from goal and dispatched a low drive past the diving Twardzik.
And Motherwell lost a quick second when Fojut lost his marker inside the penalty area at a corner and powered home his header.
But the visitors continued to battle and pulled a goal back when Lionel Ainsworth lost his footing before he got up to deliver a cross which Ramsden smashed past the ‘keeper on the volley.
United secured the three points when Ryan Dow drove towards the penalty area and cut the ball back for Telfer to shoot into the far corner.