Jarrod Bowen’s brace saw the Hammers open up a two-goal lead at half-time, but City came roaring back after the break thanks to a Jack Grealish volley and Vladimir Coufal’s own goal.
The 2-2 draw means Liverpool must avoid defeat against Southampton on Tuesday if the title race is to go to the final day of the campaign and, should that happen, City will host Aston Villa knowing victory would crown us champions for the fourth time in five seasons.
Such thoughts were a long way from City minds at half-time at the London Stadium, where West Ham capitalised on an uncharacteristically slow start from the league leaders.
Bowen beat the offside trap to open the scoring in the 24th minute, latching onto Pablo Fornals’ looping ball over the top and rounding the onrushing Ederson before firing in from an acute angle.
The winger penetrated City’s defensive line again to double the lead on the stroke of half-time, racing clear of our back four from Michail Antonio’s pass and picking out the bottom right corner with a composed finish.
The visitors were much improved after the break. Grealish pulled one back inside four minutes of the restart with a volley from Rodrigo’s knockdown that flicked off Dawson’s leg and over Fabianski.
From there it felt like there would only be one winner, but Fabianski guessed correctly to beat away the Algerian’s spot-kick, which was awarded after referee Anthony Taylor checked the pitch-side monitor and overturned his original decision following Dawson’s foul on Jesus.
It was a disappointing end to a pulsating contest in which City showed fighting spirit in abundance, but Guardiola’s men will feel satisfied to go into the final game of the season with our destiny in our own hands.
City’s stirring fightback
It felt like Guardiola’s men had a mountain to climb as Taylor’s whistle brought an end to the first half in East London.
City’s usual slick attacking play had deserted us in the opening 45-minutes, reduced to efforts from distance as the hosts defended deep and looked to play on the counter-attack.
Fernandinho, Aymeric Laporte and Oleksandr Zinchenko all blazed wide from the edge of the area, though the lively Jesus was inches away from beating Fabianski with a curling effort after a powerful run from the Ukrainian.
That was as good as it got for the visitors going forward, and, at the other end, we were punished by long balls forward.
Two punts from Fabianski allowed Bowen to score, with Fornals releasing the winger after Fernandinho only half cleared for the first, whilst Tomas Soucek and Antonio combined in a well-worked move for the second.
Thwarted by West Ham's defending in numbers in the first half, City were much improved after the break, stretching the home side with our play out wide.
Bowen let City off the hook when he fired into the side netting from a tight angle after a mix-up between Ederson and Laporte, whilst Antonio chipped wide following an under hit back pass from Fernandinho.
They were two huge chances for David Moyes’ men and they paid the price when Coufal headed what looked to be harmless free-kick from Mahrez beyond Fabianski.
With the Algerian seeing his penalty saved, both sides may feel they could have won what was a thrilling game.
For City, a draw that keeps our title fortunes in our own hands, will feel like a well-earned and vital point.
Pep Guardiola: A point gained
"It was a really good game. I think we played more than decent in the first half. Chances were so difficult to attack them.
"Very pleased to come back against West Ham like we did in this stadium. The transition with Antonio is so difficult to control and in two uncertain balls, it looks like nothing is happening, they put a ball in behind, Bowen gets it really well and finished.
"We scored an early goal and had a really good second half. A point that we gained."
Man of the Match: Jack Grealish
Scored a well-take goal at a crucial time to drag City back into the contest and was a constant threat down the left wing, where his willingness to run at Coufal caused the full-back countless problems.
This is the first time City have come back from two goals down in a top-flight game since 2012.
What it means
City are four points clear at the top of the table, which means we will be champions if Liverpool lose to Southampton at St Mary’s on Tuesday.
Should Jurgen Klopp’s men win, then we can claim back-to-back titles for the second time under Guardiola with victory over Villa at the Etihad Stadium.
If the Reds draw with Southampton, a point against Steven Gerrard's side would be enough for City on the final day.
WEST HAM: Fabianski, Coufal, Dawson, Zouma, Cresswell, Rice (C), Soucek, Bowen, Lanzini (Noble 77'), Fornals (Johnson 90+2'), Antonio (Yarmolenko 90+5').
SUBS: Areola (GK), Fredericks, Kral, Masuaku, Okoflex, Vlasic.
News about West Ham v Man City"
West Ham 2-2 City: Highlights
Watch all the goals from Manchester City’s pulsating 2-2 draw with West Ham United in the Premier League. Watch more
Gallery: Recovery session after West Ham battle!
City's unused substitutes from Sunday's draw at West Ham reported to the CFA for training on Monday morning. View more
West Ham v City: Full-match replay
Enjoy the full 90 minutes of City's pulsating Premier League clash with West Ham at the London Stadium on CITY+. Watch more
Pitcam Highlights: West Ham 2-2 City
Relive a thrilling encounter at the London Stadium from a unique angle. Watch more
Stats of the match: City drag it back at West Ham
City made it 18 games unbeaten on the road at West Ham on Sunday thanks to an inspired second half comeback. Read more
Guardiola: 'We will give the game of our lives’
Pep Guardiola says his players will give ‘the game of their lives’ against Aston Villa and is urging the City fans to do the same. Read more
West Ham 2-2 City: Extended highlights
Watch the best of the action from Manchester City's 2-2 with West Ham United in the Premier League. Watch more