Saints dominated much of the first half at McDiarmid Park but found themselves a goal behind at half-time after Steven Anderson had bundled into his own net following a dreadful blunder by keeper Peter Enckelman.
A second own goal on the hour mark, from Callum Davidson, doubled United's lead before Anderson made amends for his unfortunate strike by pulling a goal back.
However, headers from Johnny Russell and Jon Daly ensured the Tannadice side would finish comfortable victors, and Enckelman produced another howler in injury time as his attempted clearance struck team-mate Dave Mackay to allow substitute Milos Lacny to roll a fifth into the unguarded net.
St Johnstone opened in determined fashion and earned themselves a corner after just 45 seconds, but could not make anything of the first of a host of set-pieces in the opening stages.
Davidson was just inches away from giving the home side the breakthrough with a right-foot shot in the 17th minute after getting the break of the ball on the edge of the area.
Paul Dixon was vital for the visitors as he booted clear from just three yards out as Lee Croft looked to turn in a cut-back from the energetic Chris Millar.
The left-back then played a key role in an opening goal 10 minutes from the interval.
Dixon flighted in a free-kick from just inside the home half that should not have caused any problems.
But Enckelman missed his punch and the ball was diverted into his own net by the unlucky Anderson.
Three minutes from half-time St Johnstone appealed for a penalty as Lee Croft went down in the box.
However, the winger looked to have anticipated the challenge from Dusan Pernis as he beat the United keeper to the ball and was instead shown a yellow card by referee Iain Brines.
As the interval neared, a flurry of action saw Liam Craig go down in the box, Francisco Sandaza sky his shot over and Enckelman save from Scott Robertson.
Both sides pressed for the crucial second goal within seconds of the restart.
First, Anderson looked to make amends for his own goal but could not get enough on his volley from 16 yards.
Seconds later, Gavin Gunning's header from Gary Mackay-Steven's corner dropped onto the roof of the net.
Having dominated the majority of the first half, Saints were second best now and they saw United double their lead with a second own goal.
Mackay-Steven burst clear down the visitors' left and, when he hammered a low centre across the face of the goal, Davidson, with Russell breathing down his neck, could only turn the ball into his own net.
United were now firing on all cylinders and Enckelman pulled off a superb save to keep out Stuart Armstrong's shot after another great run and centre from Mackay-Steven.
Just as the visitors looked like running away with the game, Saints pulled a goal back.
Liam Craig sent in an inswinging free-kick and, as the United defence stood like statues, Anderson sneaked in to bundle in from close range.
The Tannadice were unruffled, though, and Gunning came close to a third when he hit the top of the crossbar with yet another header from a Mackay-Steven corner.
And they earned themselves breathing space six minutes from time when Dixon curled in a great free-kick from the left and Russell looped a magnificent header over Enckelman's despairing dive.
Dixon was the provider just a minute from time as Daly rubbed salt in Saints' wounds with a thumping header from the full-back's superb cross.
And, to make matters worse, Enckelman got into another mess dealing with a through ball, hitting his clearance off Mackay, to give United substitute Lacny the easiest of chances for number five.