City, reduced to 10 men for the last half-hour, had wasted no time getting off the mark when Mario Balotelli netted in the second minute after a delightful through-ball from Sergio Aguero.
Chelsea then weathered a literal and metaphorical storm as City dominated the opening period at a blustery and rainy Stamford Bridge and were lucky not to concede a penalty before levelling through a Raul Meireles volley in the 34th minute.
That goal and the 58th-minute sending off of City left-back Gael Clichy raised the home side's spirits and when Joleon Lescott handled Daniel Sturridge's shot, substitute Lampard fired home from the penalty spot on 83 minutes.
City's first defeat in 15 matches opened up the title race.
They have 38 points, two ahead of champions Manchester United and seven clear of third-placed Chelsea and Tottenham Hotspur.
"We needed to do our job to get our Premier League challenge back on track and I think it's pretty much alive now," Chelsea manager Andre Villas-Boas told Sky Sports.
"Our objective was to shorten the distance to the leaders today, we managed to do exactly that, we don't take an extra flavour from being the first team to beat them."
City manager Roberto Mancini said his side had faced an uphill task with 10 men but that the real turning point had been the penalty that should have been given when David Silva was caught on the knee by Jose Bosingwa's shin in the area
"The referee was there... this changed the game," he said.
"We can do nothing, we are the top, we know that it was possible to lose one game... I hope we can do another 14 games without losing."
City had sought to give a quick answer to questions over what effect last week's Champions League exit might have on their domestic campaign as they raced into an early lead.
Aguero saw the space in the Chelsea defence to send a pin-point pass from the outside of his right foot to Balotelli, who rounded keeper Petr Cech and calmly slotted the ball in.
The Italian striker greeted his goal with something much closer to a celebration than his usual nonchalance, half raising his arms as a flicker of a smile crossed his lips.
Chelsea could only watch on as City patiently put together a series of fluid passing moves but somehow managed to contain their visitors and stay in the game.
They had to wait until midway through the first half for their first chance which came when Didier Drogba forced City keeper Joe Hart to make a low save.
The Londoners drew level when former City forward Daniel Sturridge cut the ball back from a tight angle for a charging Meireles to smash home.
Chelsea looked sharper after the break with Juan Mata making some dangerous moves and were further boosted with their man advantage.
Clichy, shown his first yellow card early in the second half for a challenge on Sturridge, was given his marching orders after a badly timed lunge on Ramires.
That forced City into sacrificing one of their main attacking options by taking off Aguero to bring on defender Kolo Toure and Chelsea capitalised.
Lampard had been patiently watching from the bench before manager Andre Villas-Boas sent him on in the 73rd minute.
Ten minutes later the 33-year-old midfielder was celebrating after stepping up to smash home from the penalty spot and his team-mates mobbed him at the final whistle with Chelsea firmly back in the title race.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.