Philippe Senderos's 89th-minute winner gave Fulham a dramatic victory which ended Wigan's recent revival.
The Latics, who have climbed out of the bottom three in recent weeks, led through Emmerson Boyce's fierce drive.
But Fulham levelled moments later when Pavel Pogrebnyak fired into the bottom corner and the Russian hit the bar from John Arne Riise's cross soon after.
Pogrebnyak hit the post again before Senderos won it with his header from Riise's whipped free-kick.
Senderos ends goal drought
Philippe Senderos's winner for Fulham was his first in the Premier League since he scored for Arsenal against Blackburn on 11 February 2008.
It was the Swiss defender's first goal since joining Fulham in June 2010 and, until he struck, it appeared Wigan would leave Craven Cottage with a hard-earned point to go with their unlikely wins in the last month.
After four victories in their last five games, including famous triumphs over Liverpool, Manchester United and Arsenal, the Latics already had daylight between themselves and the relegation zone but they were to fall agonisingly short of what would have been another step towards beating the drop.
Wigan had started like a train against the Gunners on Monday, with two goals in the first 10 minutes, but they were far more patient and pragmatic on their return to the capital.
With the visitors content to sit back, it was left to Fulham to try to find an attacking spark but they only sporadically managed to find a way through to Ali Al Habsi's goal.
The Cottagers' best early chance was a clever Danny Murphy free-kick that caught the Wigan defence napping, but Damien Duff blasted wastefully over at the near post.
Duff also curled wide after exchanging passes with Mahamadou Diarra and bursting into the area, while Clint Dempsey fired a couple of dangerous balls across the face of goal.
Wigan created little before the break but that changed in an eventful second half which produced plenty of goalmouth action and no little controversy.
The game exploded into life with Boyce's firecracker finish after 57 minutes, with the Wigan defender surging on to a loose ball after trying to find Connor Sammon on the edge of the box, and slamming a fierce low shot into the bottom corner.
But Fulham were behind for just 71 seconds, with Pogrebnyak providing an instant response from 20 yards out after good work from Moussa Dembele.
Pogrebnyak came within an inch of adding a second five minutes later when he met Riise's low cross, and it was unclear whether the ball had crossed the line or not after it came down off the bar.
Fulham a game too far - Martinez
The Russian striker turned to celebrate after connecting with the ball before seeing it bounce down and away. Linesman Mike Mullarkey did not flag for a goal and Pogrebnyak's reaction suggested he thought that was the right decision, and that he could not believe he had missed.
Fulham continued to press and Pogrebnyak went close again minutes later, when he could only steer his follow-up on to the post after Al Habsi had pushed away Dempsey's angled drive.
With the home side completely dominant, Senderos almost found the net inadvertently when Duff's cross hit Gary Caldwell and hit him before flying into the side netting.
The Cottagers were not to be denied, however, and they snatched the points when Senderos stooped to meet Riise's delivery from the left, and direct his header past the Wigan keeper.
Martin Jol's side were already mathematically safe from the drop and, after taking 10 points from their last four games, they are now looking up rather than down the table, with this win taking them up to ninth.
Fulham boss Martin Jol on Pogrebnyak's shot that hit the bar:
"I asked Pav and he said 'no, it was not over the line'.
"I thought therefore it was not over the line but our video guy showed me it was.
"It was a goal. Maybe what Sky or BBC saw was different but what I saw from my TV man was it was behind the line."
And Jol on the result:
"It could have turned out differently but that is hypothetical and I am glad we won in the end. They had zero corners, no chances and they scored out of nothing so it would have been harsh if we had lost."
Wigan manager Roberto Martinez:
"I am disappointed with the result, with the manner the game ended.
"We knew it was going to be a very difficult game because first we knew Fulham are enjoying a very good season and are in good form and they had a lot more time to prepare.
"Obviously we had three very challenging games in eight days and today was probably a game too many. You could see that in spells.
"We allowed Fulham to come back and their equaliser was a very good strike from the edge of the box but a draw would have probably been a fair result so the set play at the end is a fantastic reward for Fulham."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.