Darren Bent's injury-time penalty condemned Manchester City to their first defeat of the season as a glaring miss left Carlos Tevez was left red-faced.
The Sunderland striker converted the spot-kick in the fourth minute of added time to snatch all three points after being hauled down by Micah Richards in front of goal.
Bent's strike was the Black Cats' reward for a concerted second-half fightback after Tevez had let them off the hook with an astonishing early miss.
The Argentinian fired high over an open goal after being played in by Yaya Toure, and the visitors were made to pay as the points slipped away.
Roberto Mancini's side dominated before the break, but were unable to take advantage, and the home side made the most of their opportunity despite losing striker Fraizer Campbell with what looked like a serious injury.
That brought greater urgency to Steve Bruce's pursuit of Ghana international striker Asamoah Gyan ahead of the transfer deadline, although he was able to comfort himself with a spirited display by his team.
However, it took a fine late save by keeper Simon Mignolet from substitute Emmanuel Adebayor to give Bent his big chance in front of a crowd of 38,610.
Mancini sent out a team which cost around £180million to assemble and was able to name seven men on the bench valued at around half that amount.
Bruce's starting XI cost less than half the figure paid out for the visitors' substitutes, a measure of the gulf between the relative spending powers of the two clubs.
Predictably, it was City who dominated the opening 45 minutes with their pace and movement and in particular, the guile of the hugely impressive Yaya Toure, repeatedly stretching the Wearsiders.
However, a combination of poor finishing and good goalkeeping meant the Black Cats went in at the break with their clean sheet intact, and that would have been pleasing for Bruce after a sub-standard display in defeat at West Brom last weekend.
That said, just how City were not in front is something Tevez would have had to explain to his manager at the break after a glaring 16th-minute miss.
The visitors looked certain to score when Yaya Toure charged down Kieran Richardson's shot and then set off on a powerhouse run upfield which left the full-back and Lee Cattermole trailing in his wake.
He might have passed early, but instead drew Mignolet before squaring for Tevez.
The Argentinian had the goal at his mercy, but contrived to scoop his shot high over the bar.
Tevez might have made amends 13 minutes later after latching on to Richardson's misplaced pass, but Michael Turner did just enough to deflect the ball wide.
But it took a fine save from Mignolet at the death to deny Yaya Toure after James Milner's free-kick was allowed to reach him unmarked at the far post.
For their part, Sunderland, who spent much of the half working desperately hard to close the visitors down, created little with Bent glancing an early header wide and Jordan Henderson shooting just off target from distance.
However, the half ended in worrying fashion with Campbell following his team-mates into the dressing room on a stretcher after a tangle of legs with Richards.
Bruce was forced into a reshuffle at the break with Campbell unable to continue and Turner failing to re-appear, Danny Welbeck and Phil Bardsley taking their places.
However, it was his side which resumed with the greater endeavour to remind City they were not going to have things all their own way.
The game was becoming increasingly open and the focus was very much on Hart's goal.
He had to punch clear as Bent rounded on Vincent Kompany's mistimed defensive header, and he then clawed Ahmed Elmohamady's wind-assisted cross clear as it threatened to sneak in at his near post.
For the first time in the game, the visitors were coming under sustained pressure, and Welbeck slashed wildly over with 68 minutes gone.
The impetus was very much with the Black Cats, but Mignolet had to pull off a superb reaction save to deny Adebayor a 79th-minute winner after Richards had headed Milner's corner back across goal.
But the drama came right at the death and when referee Mike Dean pointed to the spot after Richards had prevented Bent from reaching Elmohamady's cross, the striker made no mistake as City conceded for the first time this season.