City were forced to work hard for a 2-1 win at Villa Park, and were down to ten men for parts of the game before Villa also had a man sent off in the second period.
But Guardiola's side showed their quality and won the game through Phil Foden and Rodrigo goals.
They are now three wins away from winning their third Premier League title in four seasons.
"We know exactly what we need, it's to play like today, it's a hugely important victory," Guardiola told reporters, per the club website.
"When you arrive in the last five games depending just on yourself, it is a good boost, good credit.
"I saw the team, we were committed and after our two defeats against Leeds, against Chelsea we knew how important it was and of course for the progression for the Carabao Cup final and the Champions League game.
"It's close, the most difficult for many reasons, season of our lives, like all the clubs."