Pep Guardiola's side went into the clash at Selhurst Park knowing that a victory would put them within two points of leaders Arsenal.
Advertisement
City looked like they were heading for a frustrating stalemate, until a moment of madness from Michael Olise saw him bring Ilkay Gundogan down inside the box.
Advertisement
The former Reading man reacted rashly after the German midfielder picked up the ball from a corner, with Erling Haaland making no mistake from the spot.
He sent Vicente Guaita the wrong way as he slid his spot-kick into the bottom left corner to spark wild celebrations from the Citizens squad.
That effort put the Norwegian striker on 34 goals for the season, a staggering tally from just 35 games in all competitions.
For Arsenal, the late goal will have been a warning not to take their foot off the gas.
Advertisement
Mikel Arteta's side face Fulham at Craven Cottage on Sunday with the pressure now on to get a win to restore the five-point lead.
Advertisement
Meanwhile, the result may not be good news for former City man Patrick Vieira.
The Palace boss is under pressure at Selhurst Park with the club's hierarchy worried that the Eagles might be dragged into a relegation battle.
Advertisement
Defeat against City means that they sit in 12th spot on 27 points, four ahead of the bottom three.
Palace have won just six top-flight games all season, with the club without a league win since New Year's Eve.