Nicky Mohan scored the opener from close range from Gary Bradshaw's cross in the 23rd minute.
Wigan equalised against the run of play after Mike Price conceded a free kick out wide. Paul Dalglish hit it direct and beat Matt Glennon on his near post.
Gary Bradshaw hit the bar five minutes before half time, while Lawrie Dudfield should have done better with a rebound minutes after the restart.
Defensive errors allowed Wigan to take the lead 30 minutes later with Ian Johnson making it 2-1.
But a few minutes later Lawrie Dudfield finished well to level things.
Then City claimed the points in the dying minutes when Gary Bradshaw headed home Ben Morley's cross.
Starting line-up (4-4-2): Glennon; Petty (Kaveney), Mohan, Bloomer, Price; Morley, Whitmore, Philpott, Matthews; Bradshaw, Dudfield.
Un-used subs: Burton, Peat, Bowsley, Mulchinock.