Dungannon started the game with intent with Leo Alves' looping strike denied by the crossbar before Bobby-Jack McAleese’s shot from the edge of the box was palmed over by Aaron McCarey.
The away side then took the lead through the resulting corner when Adam Glenny headed Alves’ delivery into the path of Wallace, who fired past McCarey from point-blank range.
Shortly after the opening goal, Thomas Maguire found space but sent his strike wide of the left-hand post.
Portadown continued to struggle to test Declan Dunne with Kealan Dillon and Steven Scott having chances to double Dungannon’s lead before the break.
Yet, it was the perfect start to the second half for the home side, who levelled the game in the 49th minute when McCullough’s cross from the left wing was diverted into the net by Obhakhan.
Portadown then had two good chances to take the lead. The first when Baris Altintop’s free header from a corner was just wide before Wylie’s effort from a Mayse cross was disallowed for an offside in the build-up.
Stopper McCarey then had to make a crucial save to deny James Knowles’ header from giving McAree's side the lead with Maguire’s effort from the resulting corner narrowly wide.
The drama wasn’t done yet though as Portadown took the lead with the last attack of the game when Mayse's deep in-swinging corner was met by a stooping header from substitute Wylie to secure Portadown’s first home victory of the season.