City have ramped up their title bid in recent months, with the win over Brighton taking their unbeaten streak to 14 matches.
And Guardiola knows his side will continue to encounter tight contests as the season winds down.
"We knew how tough it would be. Brighton had a good mentality to play," Guardiola said.
"We had a really good first half and had chances. After we missed a really clear chance in the second half they were better.
"We need to win these sort of games. It is a good lesson for us. Every game will be like this."