Marcio Soares scored 28 seconds after coming on as a substitute to earn Portadown a draw with the Swifts.
Gary Breen headed Portadown in front at Shamrock Park but Dungannon hit back with goals from Matthew Hazley and Ryan Harpur before the break.
Gary Twigg poked in to level before Andy Mitchell, who had squandered earlier chances, pounced on a weak backpass and netted to make it 3-2.
Soares fired home the equaliser with his first touch on 79 minutes.
Breen rose highest at a corner to make the breakthrough before Mitchell wasted three good opportunities to level.
The equaliser came courtesy of Hazley, who scooped the ball into the net after Portadown failed to clear.
Dungannon moved 2-1 ahead a minute before half-time when Harpur followed up to score after keeper Billy Brennan spilled Hazley's shot.
Mitchell struck a post before Twigg made it all-square on the hour mark but the visitors were back in front 14 minutes later.
Mitchell latched on to Ross Redman's poor backpass and rounded Brennan before slotting in.
There was still more drama to come when Soares made an instant impact from the bench.