Amr Zaki had given the Latics the lead just before the break before Pompey substitute Niko Kranjcar equalised with eight minutes left.
The result leaves Tony Adams still searching for his first win as Pompey boss.
In the opening exchanges, Antonio Valencia tried an audacious chip from 20 yards but David James was equal to the challenge and tipped the ball superbly over the bar.
Pompey hit back with England striker Peter Crouch rattling the crossbar with an excellent looping header.
Strike partner Jermaine Defoe crossed from the left and Crouch used his 6ft 7in frame to beat the defence but his header hit the woodwork.
Papa Bouba Diop almost broke the deadlock of a dour game with a 20-yard effort, cutting in from the right before firing in a shot that flew just wide of the right-hand post.
Diop was in the thick of the action just before the break - but gave away his second penalty in four days.
He tripped Titus Bramble inside the area and Zaki fired the resulting spot-kick straight down the middle past James for his eighth goal of the campaign.
Crouch should have got Pompey back on level terms seven minutes after the break but made a hash of a simple finish.
Defoe crossed to the lanky striker who could not direct his header and put it wide with the goal at his mercy.
The forward had Pompey's best chance when Chris Kirkland picked up Jason Koumas' back-pass ten yards from goal.
Defoe blasted the free-kick goalwards but it was blocked by one of the 11 Wigan players on the line and went out for a corner.
Crouch and Sylvain Distin then both rattled the crossbar as Pompey desperately tried to grab an equaliser.
Substitute Kranjcar swung over a corner and Distin headed against the bar before Crouch headed it back against the woodwork.
But against the run of play it was England international Heskey that grabbed the late winner as Wigan moved out of the relegation zone.