City were far from their rampant best but a goal after 24 seconds from Sergio Aguero had looked set to ease them on their way to a victory that would have put them within a point of leaders Liverpool.
Instead, Newcastle, who have been labouring just above the relegation zone, hit back in the most unlikely fashion after halftime, with a goal from Salomon Rondon and an 80th minute penalty by Matt Ritchie that now elevates them to 14th.
It meant an end to the fantastic start to the New Year for Pep Guardiola's champions, who had looked ready to win their eighth straight match in 2019 once Aguero had scored the quickest goal of the season in any Premier League match.
Liverpool host Leicester City on Wednesday, with the prospect of moving seven points clear of City if they win, leaving Guardiola to ponder what now looks an increasingly tall order for his side to successfully defend the title.
Newcastle's well-laid plans were immediately shredded by their perennial tormentor Aguero, who volleyed his 15th goal in 13 league games against Newcastle when set up by David Silva's brave far post header after the Spaniard lost his footing.
Aguero had a second effort ruled out after latching on to a free kick that Kevin De Bruyne was ruled to have taken without waiting for the referee's whistle - a misdemeanour that saw the Belgian booked.
But Guardiola did not complain about the goal being disallowed, as City failed to pose many threats to the Newcastle goal and paid for their sluggish form despite dominating possession.
Rondon took advantage of City's unconvincing efforts to clear their lines in the 66th minute, instinctively hooking the ball home after Isaac Hayden had headed goalwards.
Fernandinho was City's careless culprit for the second goal, getting robbed in his own box while aiming a poor backpass towards goalkeeper Ederson and bringing down Sean Longstaff in the process.
Ritchie had a long wait while Ederson was treated for an injury but was cool enough from the spot to send the home fans into ecstasy.
Newcastle's badly-needed win during a period of turbulence at the north-east club saw the fans' protests against owner Mike Ashley dampened for a night and had manager Rafa Benitez hailing his players' spirit.
Ole Gunnar Solskjaer's winning start as Manchester United's caretaker manager ended with a 2-2 draw at home to Burnley on Tuesday, but his side avoided defeat in spirited fashion with two late goals.
Goals from Ashley Barnes and Chris Wood had given Burnley a 2-0 lead before a late rally from United with a penalty from Paul Pogba in the 87th minute and a stoppage-time goal from Victor Lindelof saved their blushes.
Wolverhampton Wanderers striker Raul Jimenez scored two superb late goals as they outclassed West Ham United 3-0 in their Premier League clash at Molineux on Tuesday.
An early goal by Brazilian forward Richarlison gave 10-man Everton a 1-0 win at bottom team Huddersfield Town after the visitors had substitute Lucas Digne sent off in a dour Premier League clash on Tuesday.