In a game best remembered by the showboating and subsequent blazing row Italian striker Mario Balotelli had with manager Roberto Mancini, the match was eventually settled by spot-kicks with England keeper Hart shining by saving two and scoring one.
Balotelli had given the Blues the lead with a 19th-minute penalty, but Mike Magee's second-half leveller ensured the game went to penalties to decide the outcome.
James Milner dispatched City's first penalty followed by Vladimir Weiss' neatly taken effort. Denis Suarez's first touch in a City shirt resulted in a goal after Galaxy missed their third kick and Kolarov made no mistake with the fourth penalty before Guidetti missed the chance to seal the game
Hart saved the first sudden death effort and then Joleon Lescott missed his with the crowd lapping it up.
Nigel de Jong kept the Blues in the hunt at 5-5 and Shaun Wright-Phillips also made no mistake before Hart saved another and then tucked home the winner.
But the row surrounding Balotelli reduced David Beckham's 45-minute appearance to a sideshow, after the former Manchester United star came in for some serious jeering from the travelling away support.