The Magpies had failed to win any of their previous 22 league meetings with City before this evening, during which time they had taken only three points from a possible 66, but they overcame a nightmare start to produce a stunning result which boosts their own hopes of survival.
Sergio Aguero gave City the lead after less than 30 seconds as they looked on course for a ninth straight win across all competitions, but Salomon Rondon levelled things up in the second half before Matt Ritchie fired home the winner from the spot.
The result means that City could fall seven points adrift of Liverpool should the leaders beat Leicester City at Anfield tomorrow, while Newcastle climb up to 14th, now five points clear of the bottom three.
Man City went into the match having scored 28 goals in their previous six outings - three more than Newcastle had managed in 27 games all season - and it took just 24 seconds for the champions to add to that tally.
Aguero - the scourge of Newcastle - made it 15 goals in 13 Premier League games against the Magpies with a close-range finish after David Silva had put the ball back into the middle with a brave stooping header from Raheem Sterling's cross.
It was the earliest Premier League goal of the season so far, and hopes of a comeback would not have been high amongst the home fans having seen their side lose on all 11 previous occasions where they had conceded the first goal this term.
Fears of another rout for the free-scoring visitors proved entirely unfounded, though, with Newcastle slowly growing into the game and creating chances through Ayoze Perez and Christian Atsu, both of which stemmed from sloppy pieces of play by Danilo.
Man City did have the ball in the back of the net again in 17th minute when Aguero produced a smart finish from Kevin De Bruyne's early free kick, only for referee Paul Tierney to pull play back and show De Bruyne a yellow card for taking the kick before the whistle.
It was Aguero who continued to look the most dangerous for City as he drew a routine stop from Martin Dubravka, but the champions were short of their best for the most part and struggled to create a regular flow of chances despite dominating possession in the opening 45 minutes.
Fabian Schar was called upon to clear another stooping header from Silva off the line just before half time, but Newcastle made it to the interval without suffering any further damage after their nightmare start.
A wicked delivery from Leroy Sane almost provided another quick opening to a half for City upon the restart as the ball flashed under the foot of Sterling, who could not get the touch to turn it home from close range.
Silva should have done better shortly before the hour mark when he collected a pass from De Bruyne in space only to put his finish straight at Dubravka, and both sides were fortunate not to go down to 10 men moments later when the referee opted for leniency following fouls by De Bruyne and Perez, both of whom had already been booked.
Pep Guardiola withdrew De Bruyne moments later as a precaution, but even with 11 against 11 Newcastle soon equalised as Man City failed to deal with an aerial ball into the box, allowing Rondon to scramble a volley home from inside the area.
It was the first goal City had conceded in their last seven matches across all competitions and, despite enjoying 90% of possession in the 10 minutes following the leveller, the champions found themselves behind not long after.
Fernandinho turned blindly inside his own area and was pounced upon by Sean Longstaff before inadvertently tripping the Newcastle midfielder to leave Paul Tierney little choice but to point to the spot.
Ritchie had a long wait as Ederson received treatment before the penalty could take place, but he made no mistake when the whistle finally went as he blasted his spot kick through the Man City keeper to send St James' Park into raptures.
More Man City pressure followed, including a couple of goalmouth scrambles which came to an end due to the offside flag being raised, but there were no clear chances in the closing exchanges as Newcastle held out for their first league win over City since 2005.
Guardiola looked increasingly forlorn as his 100th Premier League game as a manager ended in one of his most surprising defeats, leaving him alongside Jose Mourinho with the competition's best-ever record of 73 wins from the opening century of matches.
City remain four points behind Liverpool, who are in action on Wednesday night and have the chance to move one step closer to a first league title since 1990 should they overcome Leicester.
NEWCASTLE (5-4-1): Dubravka; Yedlin, Schar, Lascelles, Lejeune, Ritchie; Perez (Manquillo 98'), Hayden, Longstaff, Atsu (Kenedy 87'); Rondon
MAN CITY (4-3-3): Ederson; Walker, Stones, Laporte, Danilo (Gundogan 83'); De Bruyne (Bernardo 65'), Fernandinho, Silva; Sterling, Aguero, Sane (Jesus 73')
body check tags ::