City equalised in the 30th minute when Haaland leapt to head home Matheus Nunes's long cross into the far corner. His 13th league goal of the season drew him level with the league's top scorer Mohamed Salah of Liverpool.
Maxence Lacroix put Palace ahead against the run of play in the 56th minute when he leapt, completely unmarked, to head in Hughes' corner.
But City drew level again in the 68th when Bernardo Silva threaded a beautiful through ball to Lewis, who emphatically fired home for his first goal of the season and third league goal of his career.
City were reduced to 10 men in the 84th minute after Lewis picked up his second yellow for a tackle on Trevoh Chalobah. Guardiola made an angry beeline for the officials after the final whistle to argue the decision.
City were coming off a thoroughly dominant 3-0 home victory over Nottingham Forest which marked a return to winning ways after what had been a tough run of results, but the celebration was short-lived.
Guardiola's side squandered several other chances including an early point-blank shot from Haaland that Palace keeper Dean Henderson stopped with the side of his face, and then was down for several minutes receiving treatment before continuing.
Ilkay Gundogan also fired a long shot off the post in the first half.