Kane had put Tottenham 2-1 ahead in the 59th minute only for a Cristian Romero handball to allow Riyad Mahrez to equalise for the league leaders from the penalty spot in the 92nd minute.
City looked favourites to claw out a dramatic late victory, but Kane’s header in the sixth minute of added time clinched a league double for Tottenham over City, having beaten them on the opening weekend of the season.
Tottenham had stunned City in the fourth minute when Dejan Kulusevski scored on his first league start since joining on loan from Juventus but Ilkay Gundogan levelled before halftime.
City’s defeat, only their third in the league this season, means they are now only six points ahead of Liverpool who also have a game in hand after Liverpool beat Norwich City earlier.
“We kind of thought we’d rescued it. If you look at the whole game we deserved to win. But football is sometimes crazy and today we made easy mistakes,” Gundogan said.
Kane did not even play in Tottenham’s August win over City when the England striker was holding out for a big-money move away from north London to join Guardiola’s champions.
On Saturday he produced a stunning all-round display to show City what they missed out on.
The striker could have had four goals with Ederson keeping one effort out from point blank range and then having another ruled out for offside when Tottenham led 2-1.
But after Mahrez appeared to have snatched victory away from Antonio Conte’s side, Kane pounced to revive his side’s top-four ambitions after three successive league defeats.
“We had to find a way to get our season back on track,” Kane said. “Tough place to come against one of the best teams in the world but to grind out the result we did was really special.”
City had won 14 of their previous 15 games, drawing the other, to seize control of the title race.
And with Tottenham in a rut, they were fully expected to re-open their nine-point lead at the top.
But Tottenham have often proved a stumbling block for City and they went ahead with a well-worked goal.
Kane’s superb lay-off sent Son Heung-min down the left and he picked out Kulusevski to coolly slot past Ederson.
City responded by swarming forward and Gundogan was denied when his curled effort hit the woodwork.
But a mistake by Tottenham keeper Hugo Lloris allowed City to level. He could not hold Raheem Sterling’s dangerous ball in towards Kevin de Bruyne and the ball popped up invitingly for Gundogan to equalise.
City dominated after the break and it seemed only a matter of time before they went ahead. But Tottenham were always a menace on the counter-attack and from one rare raid forward Son linked well with Ryan Sessegnon before his pass picked out Kane to sidefoot high past Ederson.
Ederson denied Kane again shortly afterwards from point-blank range and Kane the had a goal ruled out in the 73rd minute after a VAR check for offside in the build-up.
When Romero slid in to block Bernardo Silva’s shot and the ball struck his raised arm, referee Anthony Taylor was eventually invited to check a pitch-side monitor, returning to point to the spot and offer City salvation.
Mahrez duly belted his spot kick high past Lloris but there was a sting in the tail as Kulusevski’s low cross found Kane who showed great strength to head the winner.