The Blues were behind inside the first minute against the Bees and but for at least one excellent save by Ederson, the defending Premier League champions could have fallen further behind.
But a brace from the prolific Erling Haaland ensured City’s 100% record was maintained.
“It’s important we don’t drop points, it’s a good lesson,” said Guardiola.
“We were lucky with the deflection Erling scored. The players know it.
“That’s why at half time, I didn’t say anything. There will be a lot of surprises with this number of games and one day we are going to drop points.
“With a really tough game, we survived and with our mentality we adjusted. We did really well with our process to find the right moments.”
The boss was also asked if he had any thoughts on the new Champions League format.
City begin this season’s European campaign at home to Inter on Wednesday, but Pep says he hasn’t any thoughts on the new-look UCL.
“[I’ve] no opinion,” he said. “They decide to do this. UEFA decide this. We want to be there so we will play that format.
“[There are] more games, but it is what it is. What can we do? On Wednesday, we play the best team in Italy then on Sunday we play best contender of last two seasons.
“Then Tuesday another game. We have an Academy. We have to adapt. I like to play Champions League, so we are going to play.”
Watch part 2 of Pep’s post-match press conference by playing the video above.