Guardiola, who moved to the Etihad Stadium ahead of the 2016-17 season, led City to the 2017-18 Premier League title in record-breaking fashion.
The Spaniard penned a three-year contract with the Citizens upon his arrival, but has now extended the deal until the end of the 2020-21 campaign.
"I am so happy and excited. It's a pleasure to be able to work here," Guardiola told the club's official website. "I enjoy working with our players every day and we will try to do our best together in the coming years. As a manager, you have to feel good to be with the players – and I feel good.
"I will focus on the desire of my players to become a better team and every day that's what I will try to do – to improve on the pitch and improve our players. We have a young squad with an average age of 23 and we want to keep taking steps forward and maintain the levels we've achieved this season."
City chairman Khaldoon Al Mubarak added: "We are delighted to announce the extension of Pep's contract through to 2021. In his two seasons with us, he has fostered an incredible spirit within the squad and significantly contributed to our progress both on and off the field.
"In doing so he has embodied the passion and commitment we all have for the club. I am very much looking forward to the continued impact of his work and to fulfilling our shared ambitions in the coming seasons."
City also won the EFL Cup during the 2017-18 season with victory over Arsenal back in February.