City squandered the lead given to them by Bernardo Silva in the first half at the London Stadium as Konstantinos Mavropanos headed West Ham's equaliser before the interval.
Just hours after Arsenal scored twice in the final minutes of their 2-0 victory over Everton, Guardiola's side were unable to muster a response.
Second-placed City have a game in hand on Arsenal and host the leaders in April, but with just eight matches left for the spluttering challengers, many pundits have written them off.
However, Guardiola remains defiant, claiming City will not throw in the towel.
"It's not over. Who said that? We didn't lose. We will continue," he said.
"Nine points is a lot against Arsenal but it happened. We have the game at home so we have to try until the end.
"When it is not possible then we congratulate the champion but we have to try."
The only team to win a Premier League title having ended a match at least nine points behind the leaders having played 30 or more games was City in 2013-14.
But City are hardly in peak form at present, drawing their last two league games against relegation-threatened West Ham and Nottingham Forest.
City were also brutally exposed in a 3-0 defeat at Real Madrid in the Champions League last-16 first leg in midweek.
They host the Spanish club in the second leg next week before facing Arsenal in the League Cup final and then meeting Liverpool in the FA Cup quarter-finals.
"We have an incredible team, spirit. We had an incredible amount of effort in Madrid. The last two games, we played much, much better," Guardiola said.
"We are an incredible team. We play so good. The guys go and go until we can't continue. But we didn't score enough goals when we had the quality and they punished us."
'We've been punished'
Arsenal, runners-up for the last three seasons, blew substantial leads to allow City to take the title in 2023 and 2024.
But, for all his optimism, Guardiola knows the task of catching the Gunners this time is a daunting one.
"It's so difficult but we have a game in hand, this game at home against Arsenal. I'm not saying it will be easy to beat them but there is hope. Always, you have to be there," he said.
"I don't know how they are playing because I didn't see the last games but I have a few things that I like. It could be better but it is what it is."
City striker Erling Haaland was well below his best once again and has scored just three times in his last 12 league games.
Guardiola acknowledged City's lack of cutting edge has been a key factor in their erratic form.
"We didn't score enough goals. It happened a thousand million times for this team in the last decade but this season we struggled," he said.
"We were without much threat and I don't like that. You need the spark in the final third with your players.
"To win the Premier League you need to be more consistent. In the past we had the consistency to win and win and win, to always find a way.
"This season, not scoring goals for the amount of chances we've created, we've been punished."
