Newcastle United midfielder Jonjo Shelvey scored a stunning late goal to dent Manchester City's title chances in a 2-2 draw at St James' Park on Saturday.
City go second in the table but could find themselves 11 points behind leaders Liverpool if Jurgen Klopp's side beat Brighton later.
"We found a way and today we found it again but unfortunately, at the end, we conceded a goal," Guardiola said.
"We could not score all the chances we had; they scored the two chances they had. Sometimes it happens. In good moments, be calm. In bad moments, live these kind of moments."
The visitors enjoyed overwhelming territorial superiority after the break but lacked their usual cutting edge as Newcastle sat deep.
City went back in front with 10 minutes remaining when Kevin De Bruyne scored a stunning volley from outside of the box.
But the hosts fought back once more when Shelvey curled a long range shot in the bottom corner. City still could have snatched victory with Sterling, who had scored their opener, having a late effort well saved by outstanding home keeper Martin Dubravka.
The final whistle was greeted with a huge cheer from the home fans who saw their side move six points clear of the relegation zone before the later kickoffs.
City welcome Burnley to the Etihad in midweek while Newcastle travel to Sheffield United.