The 34-year-old, whose existing deal expired this month, began the season under a shadow after Guardiola omitted him from City's Champions League squad.
That sparked a rift with the player's agent Dimitri Seluk, who claimed Toure had been humiliated, which resulted in the manager insisting the Ivorian would not be included in any team until he apologised.
Toure eventually smoothed things over and returned to the side to play an instrumental role in the second half of the season, resulting in the offer of a new contract.
"Yaya has been a fantastic servant for Manchester City and continues to be a vital member of Pep Guardiola's squad," City's director of football Txiki Begiristain told mancity.com.
"He is one of our most experienced and popular players and we couldn't be happier that he is staying with us as we embark on what we all hope will be a very exciting season.
"Yaya has been central to the successes we've had over the past seven years and he has a vital part to play next season,"
Toure has won six trophies, including two Premier League titles and an FA Cup, with the club since joining from Barcelona in 2010.
"I'm delighted. I told myself the journey at City is not done and when I received a call from Txiki and talked to the manager I was very delighted," said the midfielder.
"When I was first coming here I was trying to be part of a new story, of something special at this club. I am very lucky now to be part of a great club with great players around me who are helping me to achieve my targets.
"Of course I want to win trophies, that is very important to me. I want to enjoy it at this age still and remaining here is a massive, massive thing.
"It is a great club, going in the right direction with new players who are coming in."