Cheltenham's Ben Tozer then pulled off a miracle clearance as Benjamin Mendy blasted an effort at goal, with his headed clearance as the ball was about to puncture the net a moment of heroism that kept the dream alive for the side playing at their wonderfully named Jonny-Rocks Stadium.
Cheltenham, 72 places lower than City in the standings, were holding on and edging towards a fairytale win but reality returned when Phil Foden equalised in the 81st minute. That was followed up three minutes later when Gabriel Jesus connected on a lobbed pass from fellow Brazilian Fernandinho to take help City take the lead.
But this tie had everything apart from, sadly, a baying crowd because of the COVID-19 pandemic.
"I'm pretty sure he will leave at the end of the season and now, in this window, it will depend on the agreement between the clubs", Guardiola concluded in the press room. We came here with humility and had the quality to make the difference. "That's why he is one of the best strikers ever - not just in England - all the time in football history". It is hard to control that.
Robins boss Michael Duff expects their opponents to have a bit of a culture shock when they arrive at Cheltenham.
"I'm incredibly proud. The players they brought on from the bench and the way they celebrated the goals tells you something. We were unlucky that we were without Eric, Aymer, Nathan (Ake), we had just two centre-backs", said Guardiola.
They are also second in the Premier League, play Borussia Monchengladbach in the last 16 of the Champions League next month and face Tottenham in the Carabao Cup final in April.
Jesus nearly gave City the lead inside the opening minute when he tried to dink a shot over home keeper Josh Griffiths.
It was the first goal City had conceded in around 500 minutes.
The clocked was ticking towards 82 minutes and Cheltenham were edging closer to glory when Foden ghosted into the box and finished from close range, with TV replays confirming he had timed his run to perfection to stay on-side.