Wigan made a fast start with Jordan Cousins heading over, before narrowly failing to find Will Keane in a good position.
Latics then gained a stranglehold in the game with two goals in the space of seven minutes just before half-time.
First, Callum Lang headed powerfully home from Tom Pearce's left-wing delivery.
Then, in first-half stoppage-time, Keane slotted home from another Pearce cross.
The Latics fans were enjoying their night, until it all started to unravel just after the hour mark.
Hirst pulled one back on 62 minutes, before repeating the trick two minutes later.
Latics then needed Amos to make a stunning save to deny Marcus Harness, with Jack Whatmough then called on to make an inch-perfect sliding challenge to deny Hirst his hat-trick.
But it was all Pompey at this point, and substitute Aiden O'Brien completed an unlikely - and painful, from Latics' point of view - comeback with three minutes left.