Guardiola has been feeling severe pain at his back for some time and has decided to get it sorted out as soon as possible.
The 52-year-old will therefore be missing from the touchline until after the upcoming international break.
Manchester City will travel to Sheffield United on Sunday before hosting Fulham next weekend.
In Guardiola's absence, assistant manager Juanma Lillo will oversee affairs from the touchline.
City released an official statement confirming the news on Tuesday, which reads: "Pep Guardiola has today undergone a routine operation on a back problem. The Manchester City boss has been suffering with severe back pain for some time lately, and flew out to Barcelona for emergency surgery performed by Dr Mireia Illueca. The surgery was a success, and Pep will now recover and rehabilitate in Barcelona.
"In his absence, assistant manager Juanma Lillo will oversee coaching of the first team on the training field and will assume duties on the touchline until Pep’s return. He is expected to return after the forthcoming international break.
"Everyone at Manchester City wishes Pep a speedy recovery, and look forward to seeing him back in Manchester soon."