Spanish duo Pablo Hernandez and Miguel Michu helped steer Swansea to a first win in six league games as Wigan's poor form continued at the Liberty Stadium.
Hernandez set the Swans on their way with a delightful shot on the turn following good work by Wayne Routledge.
Michu doubled the lead after heading home unmarked, his sixth league goal since signing in the summer.
Emmerson Boyce's flicked finish gave Wigan hope before Arouna Kone was denied an equaliser by an offside flag.
Ivory Coast striker Kone will feel aggrieved that his header was not given, with television replays showing Wigan had cause for complaint.
But the Latics are without a top-flight win since 25 August and will wonder how they failed to come away from Wales with at least a point after looking comfortable for long spells.
It might have been different had Swans keeper Michel Vorm, celebrating his 29th birthday, not made a flying save to deny Wigan keeper Ali Al Habsi from a corner in the fifth minute of stoppage time.
The thrilling climax was in stark contrast to the opening 45 minutes which proved a dull affair.
With matches away to reigning champions Manchester City and home to leaders Chelsea on the horizon, it was vital Swansea ended a run of five league matches without a win.
The build-up to the game was overshadowed by reports of unrest in the home dressing room, a claim
Yet despite failing to seriously trouble Latics keeper Al Habsi in the first half, the hosts could not be accused of a lack of effort, especially after a mistake by Boyce allowed Michu to go close with an 18th minute volley.
Jonathan de Guzman, on loan from Villarreal, tried his best to inject some much needed quality into a game littered by mis-placed passes and he went close with a curling 20-yard effort.
But the hosts had Vorm to thank for keeping them on level terms, the Dutch keeper denying Shaun Maloney from close range before Jean Beausejour went close to netting a rare goal from an acute angle after leaving Ki Sung-yueng trailing in his wake.
The second half was much more entertaining, Hernandez's 65th minute opener the first of three goals in four minutes.
Routledge did all the hard work and after getting the better of Ivan Ramis, the Swansea player delivered a fine cross which allowed Hernandez to score with a low effort.
Michu doubled the lead two minutes later from a corner, Wigan's defence again at fault for allowing the Spaniard to nod home unmarked from close range.
Boyce set up a grandstand finish with a clever flick in the 69th minute after clever work by Kone but despite Kone's disallowed effort and Al Habsi's last-gasp effort, Wigan could not find an equaliser on Roberto Martinez's return to his former club.
Swansea manager Michael Laudrup:
"They had a goal disallowed which was very, very tight but to come back after some games without winning it would be too easy to win without suffering.
"You can say there is a mixture of joy and relief, we knew today was very important for us and I think if you see the game the players played with a lot of confidence and patience.
"But you know when you really want something, in this case a win, you cannot think you can do it in 10 minutes. At this level it takes 90 or 94 minutes and that is what happened."
Wigan manager Roberto Martinez:
"I think we deserved something, it was the game we all expected in terms of the manner of both teams and the concepts we share.
"It's a difficult decision and when I saw it live (offside goal) I thought it should have been given. It's disappointing that call did not go our way.
"Anyway, I shouldn't talk about referees this season. I've learnt my lesson."