David Jeffrey’s side leap-frogged their County Tyrone opponents in the league table after a remarkable four-goal salvo inside the opening 35 minutes.
The win takes Ballymena further away from the relegation scrap but perhaps equally importantly, it puts the Sky Blues in a strong position to challenge for seventh position and a place in the new-look play-offs for a Europa League place.
Jeffrey made two changes to the line-up which drew 1-1 at Glenavon in midweek.
Defender Johnny Taylor - United’s scorer at Mourneview Park - was absent as his wife is due to give birth to their first child. He was replaced by Paddy McNally, while Darren Henderson came in for the injured Gary Thompson.
Both teams made a bright start in the Stangmore Park sunshine, with Matthew Hazley just unable to steer Cormac Burke’s knockdown the right side of the post, while at the other end, Willie Faulkner’s clever turn and shot from just outside the area forced Andy Coleman to dive to his right to push the shot away.
United went in front on six minutes when Stephen McBride’s cross was headed against the crossbar at the back post by Jonny Frazer, with Darren Henderson on hand to nod home the rebound from close range.
Dungannon were almost level within two minutes as Kyle McVey lost his footing, giving Jamie Glackin a yard of space to beat Alan Blayney with a low shot but his effort was cleared off the line by the alert Stephen McBride.
The Swifts were only just beginning to get over that early setback when they found themselves 2-0 down after 16 minutes.
The home side made a complete hash of attempting to clear David Cushley’s corner kick, with several miscued hacks before Kyle McVey lashed the loose ball into the roof of the net from 15 yards.
Dungannon needed a quick response and they were back in the game on 22 minutes.
The goal owed much to the perseverance of right-back Andrew Burns, whose searing run took him to the dead-ball line from where he cut the ball back for Jamie Glackin to side-fit home his first goal of the season.
But just after the half-hour mark, Ballymena restored their two-goal advantage from a devastating counter-attack.
With Dungannon making half-hearted appeals for a penalty for a handball against Allan Jenkins, Ballymena broke quickly with Faulkner releasing Henderson and the striker raced clear to slot past the advancing Coleman at the keeper’s near post.
And it was 4-1 on 35 minutes with a nother goal of high quality.
Jonny Frazer burst forward with the ball inside the centre circle before clipping a pass to Tony Kane, who managed to beat the offside trap to scurry clear down the right flank before producing a sumptuously-measured cross which was headed home by the in-rushing Frazer, who had continued his run forward.
Dungannon certainly didn’t give up and they made two changes at the break. One of the new arrivals, Terry Fitzpatrick, almost had an immediate impact as he found Andrew Mitchell inside the penalty area but the big striker failed to get any real purchase on his effort and Alan Blayney stuck out his right boot to block the shot.
Blayney was again called into action a couple of minutes later, getting down quickly to block Andrew Burns’ shot as the full-back marauded forward once again.
Ballymena were content to soak up the pressure and hit on the counter-attack with a teasing cross from the left which was just inches too far for the in-rushing Faulkner.
At the other end, Blayney was again quickly off his line to clear the danger as former United winger Alan Teggart burst onto a loose ball.
Andrew Mitchell endured a frustrating day in attack for Swifst but he had the final say in the game deep in stoppage time when he exchanged passes with Jamie Glackin and side-stepped a couple of challenges before firing into Blayney’s bottom corner.
Dungannon Swifts: Coleman, Burns (sub Montgomery 71), Armstrong, Hegarty, O’Rourke, Burke (sub Liggett 46), Glackin, Harpur, Hazley (sub Fitzpatrick 46), Teggart, Mitchell. Subs (not used): Addis, McCaffrey.
Ballymena United: Blayney, Ervin, McVey, McNally, McBride, Frazer (sub E Kane 68), T Kane, Cushley (sub Ruddy 79), Jenkins, Faulkner (sub Millar 86), Henderson. Subs (not used): Nelson, Hanley.
Referee: Tim Marshall (Irvinestown)