Argentine seals all three points for visitors against the run of play, moving the visitors off the bottom on the table and within touching distance of Steve Bruce's side
The Latics manager seemed content with a point as his side defended resolutely in the second half, but his late introduction of striker Franco di Santo proved decisive.
Sebastian Larsson opened the scoring for the home side early in the match, but Wigan pegged back before the interval to bring the score level at half.
The second half saw the home side waste more chances until Wigan substitute di Santo cruelly struck at the death to vitally take all three points.
The Latics drew first blood in the match, literally, when Sunderland midfielder Lee Catermole suffered a gash above his eye, though the Black Cats enforcer returned moments later with stitches.
Sunderland avenged Wigan's early aggression on eight minutes to score a deserved opener. Nicklas Bendtner fired from left-side range, his driven shot bouncing just in front of Ali Al-Habsi, troubling the goalkeeper who could only parry.
After a brief melee inside the eight-yard box, Larsson emerged to slam the ball into the Wigan net to give the home side a 1-0 lead.
The visitors were unable to seize the moral advantage after going behind so early in the match as the Black Cats continued to dominate possession and scoring chances.
On 14 minutes, former Manchester United teammates combined as John O'Shea sent Kieran Richardson through to fire near-post, but the Wigan keeper redeemed himself, saving expertly to concede a corner kick.
The Black Cats threatened from the ensuing kick when Wes Brown headed Larrson's cross from close range, but Al-Habsi continued to make amends by saving instinctively from point-blank range.
Wigan had yet to muster a serious threat, or even a shot on target, as evidenced by midfielder David Jones firing over on 20 minutes.
The home side continued to control most of the possession throughout the first half, but they were unable to tally an insurance goal despite their ascendancy.
Phil Bardsley missed a sitter on 39 minutes after more slick passing from the Black Cats opened up Wigan's left side, allowing Richardson get in behind and pass square to the wide-open left-back only to sky his shot over the bar from close range.
Despite being ahead on the scoreboard, the anxiety on manager Steve Bruce's face was evident at every opportunity spurned by his side. His premonitions were soon proven well-founded.
Wigan equalized just before half-time. Victor Moses shifted past O'Shea, and a recovering Larsson nicked his heels. The Nigerian obligingly went down and referee Kevin Friend pointed to the spot despite wild Sunderland protesting.
The replays vindicated the referee's decision, and Jordi Gomez coolly slotted the spot kick low and right as Sunderland stand-in Kieran Westwood dove the other way.
The first half finished 1-1 as Larsson continued to argue the referee's decision.
Indeed, Sunderland were almost immediately denied a seeming penalty themselves when second half play began. Jack Colback fired from the middle of Wigan's box but the referee again got it right, waving off penalty claims after the ball struck the chest of a Latics defender.
The two sides see-sawed back and forth with neither creating clear-cut opportunities for much of the next twenty minutes.
Bruce shuffled his hand after 65 minutes, bringing on bringing on David Vaughan and Craig Gardner for Cattermole and Bardsley, respectively.
Martinez deigned an attacking resolve by bringing on James McArthur for Ronnie Stam after 70 minutes, but Wigan continued to defend deep, repelling any Sunderland advance.
The home side again should have gone ahead on 78 minutes when Gardner got behind the defense, but Richardson failed to connect to the peach of a cross from close range as the goal-mouth beckoned.
Wigan's Mohamed Diame got his name in the book on 83 minutes, after an inconspicuous shoulder-charge, allowing both managers to make further alterations.
Bruce clearly had three points in mind, taking off right-back O'Shea and introducing Dong-Wong Ji. Martinez switched his strikers, taking out the exhausted Sammon and bringing in Di Santo.
Almost immediately thereafter, Sunderland broke the visitor's offside trap but Richardson was again unable to convert with his weaker right foot.
That failure, among many others, turned out to haunt Sunderland cruelly when Wigan smash-grabbed all three points at the death of the match.
A punted clearance seemed to be controlled by the Black Cat's backline, but Brown was overly casual with his goalie's pass, allowing Di Santo to plunder the spoils by slotting into an open net in stoppage time.
The Argentine's fourth goal of the season was the deciding one as Wigan earned their first win in ten matches.
Cries of "Bruce out" exemplified the frustrations Sunderland fans certainly feel having dropped three points at home to the league's bottom dweller.
With the victory, Wigan moved off the bottom of the table into 19th place.