Anthony Pilkington grabbed a dramatic stoppage-time equaliser to boost Wigan's hopes of avoiding relegation and dent Bristol City's play-off aspirations following a 2-2 draw at Ashton Gate.
The Robins were moments away from a third successive win but the point leaves them in sixth spot, two points clear of seventh-placed Derby, while Wigan are now just two points above the drop zone.
Matty Taylor had marked his return to Bristol City's starting line-up with a goal and an assist but was denied a winning comeback by Pilkington's last-gasp strike.
Brought in for the injured Andreas Weimann, the striker headed a 65th minute equaliser from a Niclas Eliasson cross and three minutes later set up Kasey Palmer to fire into the roof of the net from 12 yards.
Wigan had taken a 37th-minute lead through a swerving 30-yard shot from midfielder Reece James and also hit a post in the first half.
The game swung on a triple substitution made by City head coach Lee Johnson just before the hour mark, including the introduction of Eliasson and Palmer, which galvanised his team.
But Wigan boss Paul Cook could also claim inspired changes, sending on Pilkington and Leon Clarke in the closing stages as his side fought to the final whistle.
The visitors created the first clear chance of the game after five minutes, defender Chey Dunkley side-footing wide from a James free-kick when he should have hit the target.
After having a couple of shots blocked, City forced a first save from Christian Walton when Josh Brownhill's long-range strike on 24 minutes was straight at the Wigan goalkeeper.
Walton had to produce a much better stop two minutes later, tipping Jay Dasilva's fierce volley from an angle over the crossbar.
City should have gone ahead after 36 minutes when top scorer Famara Diedhiou somehow headed over from inside the six-yard box after rising unmarked to meet a Jamie Paterson corner.
Seconds later the visitors were in front through James' stunning strike and moments after that Diedhiou missed another great opportunity as Walton dived to smother his shot from 12 yards.
Only the woodwork prevented Wigan going two up after 42 minutes when Nick Powell's low cross from the right was missed by team-mate Josh Windass and struck the foot of the far post with City keeper Max O'Leary wrong-footed.
The second half began with O'Leary diving to beat away a Danny Fox volley and by the 59th minute Johnson had seen enough and made his triple change, sending on Palmer, Eliasson and Lloyd Kelly.
The home side switched to 4-4-2 from their wing-back system and six minutes later Taylor equalised and the home fans turned up the volume.
With Wigan suddenly reeling, Palmer fired the second and the ground was rocking.
City had chances to increase their lead but were made pay when Pilkington rewarded nearly 500 travelling fans at the death, converting after Clarke's effort was blocked on the line.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport Staff');
ga('pacontentapi.set', 'dimension2', 'c050d1d1-5dde-4fb0-8290-e45f3213a7bb');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:club-news,paservice:sport:football,paservice:sport:match-reports');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Pilkington rescues Wigan and delivers blow to Bristol City'});