In an uncanny repeat of the 2013 FA Cup final, in which City had a player sent off before losing to a late Wigan winner, Guardiola's side had Fabian Delph dismissed amid stormy scenes before Will Grigg's 79th-minute goal decided the game last night.
A famous night was marred, however, by a post-match pitch invasion by Wigan supporters which saw a number of them confront City players, with striker Sergio Aguero required to defend himself.
It was only City's second defeat to English opposition since losing an FA Cup semi-final to Arsenal last April while their opponents can now look forward to a quarter-final home tie with Southampton.
The pivotal sending-off arrived in first half injury-time when Fabian Delph made a rash challenge on Wigan's Max Power, prompting referee Anthony Taylor to pull a yellow card out of his pocket before changing his mind and producing red.
Also Read
The scene turned even uglier, with television cameras in the tunnel capturing footage of Guardiola and Wigan manager Paul Cook in a major verbal confrontation and being kept apart by staff.
- Wasteful Aguero -
===================
City might have enjoyed a far more comfortable evening had their record goalscorer Aguero not missed a golden opportunity after just two minutes, heading over Bernardo Silva's pinpoint cross from just six yards.
Guardiola had made six changes for the tie, while still fielding a strong line-up, but two of his fringe players -- full-back Danilo and back-up goalkeeper Claudio Bravo -- were guilty of errors which offered the hosts a glimmer of hope.
First Bravo and Danilo dithered in dealing with the ball, almost presenting Gareth Roberts with a chance on the six-yard line.
And then Danilo was robbed of the ball by Roberts, the ball breaking for Grigg who raced half the length of the field before shooting into the side-netting.
They came close, from Leroy Sane's 26th-minute corner which Gundogan flicked across the six-yard area, but defender Aymeric Laporte failed to connect with the ball at his feet.
When City next threatened, after Stones headed down Delph's cross, Fernandinho's shot rose over by some distance when he looked certain to score.
Gundogan and Danilo, twice, also threatened the Wigan goal and Walton saved superbly from an Aguero drive, moments before the explosive dismissal of Delph.
Guardiola brought on England right-back Walker as a half-time substitute, moving Danilo over to Delph's vacant left-back spot.
The Belgian's introduction brought a far greater threat from City, particularly from set-pieces.
On 73 minutes, De Bruyne found Aguero at the near-post but his shot was blocked and Danilo maintained the pressure with a low centre across the goalline before Grigg's dramatic intervention.
Disclaimer: No Business Standard Journalist was involved in creation of this content