Ten-man Glentoran moved up to third in the Premiership with this victory.
Marcus Kane nipped in to score from close range after Niall Morgan had failed to hold a Stephen McAlorum free-kick after 29 minutes.
The Swifts restored parity through a Darren Boyce penalty a minute later after Richard Clarke fouled Jamie Douglas inside the area.
Jimmy Callacher was sent-off for a second bookable offence on 52 but Jason Hill volleyed into the net after 82.
Hill fired in first-time after meeting a cross from the left.
Dungannon began the game brightly and Elliott Morris was forced into a fine save from Ryan Harpur, while James Costello just failed to connect with a Boyce delivery.
Callacher's dismissal, the Glens' fifth red card of the season, came after a foul on Douglas.
With the score at 1-1, the hosts could have gone ahead when Dermot McCaffrey's well-struck shot came off the bar, but soon after Hill clinched the three points for the visitors.