The Premier League side struggled to break Swansea down after the break, but Bernardo Silva's goal in the 68th minute got the visitors back in the match.
In the first match, Watford edged a narrow 2-1 win over Crystal Palace as Andre Gray came off the bench to net a late victor at Vicarage Road.
The City pressure intensified and Aguero had the final word in the 88th minute with a stooping header to complete a stunning fightback.
It's what Manchester United used to do with Sir Alex Ferguson, Barcelona, Real Madrid, Bayern Munich, Juventus - these kinds of teams, every season they are there.
But United were unable to match their city rivals, slipping to a 2-1 defeat at Wolves to hand interim manager Ole Gunnar Solskjaer a second consecutive defeat. Bersant Celina then doubled the lead by finishing off a sublime move with a curling first-time finish into the corner in the 29th.
Adding to City's good fortune was the fact the equaliser had only gone in after Sergio Aguero's penalty bounced in off goalkeeper Kristoffer Nordfeldt.
Lukaku injury Will Man Utd striker be fit for Wolves and Watford
Aguero restored parity in fortuitous circumstances when his spot-kick hit a post and went in via Nordfeldt's back.
The Argentina striker then headed the victor in the 88th. You have to ask the authorities why it is not here.
But the Football Association ruled only Premier League grounds would use the system at the last-eight stage, a decision that Swansea labelled "strange" given that the club possesses the technology to accommodate VAR.
"It could have gone either way, Congratulations to Swansea who played very well and made it hard but we kept going, pressing and eventually the goals came".
"If it is not penalty, and it is offside like the people say, I'm sorry", Guardiola said. The players who need to increase, they have to improve because we need it.
In the last quarterfinal, Millwall hosts Brighton on Sunday.
The Seagulls scored twice in the time that remained before winning on penalties to secure a place in the last four.
Cristiano Ronaldo: Patrice Evra LEAKS WhatsApp message predicting Champions League heroics
Messi added: "There are some very good teams left like Manchester City, Juventus like I said". Liverpool eliminated Bundesliga power Bayern Munich 3-1 to make the final cut.