Chelsea led at half-time through Gary Cahill but two goals in quick succession from skipper Gallas and Defoe - his 200th career goal - turned the game on its head early on in what proved to be a dramatic second half.
However, the table-toppers hit back again with three goals in the last 25 minutes to register their visit win at the Lane in seven attempts and inflict our first London derby defeat here since September, 2007.
Andre Villas-Boas made three changes to the side which beat Aston Villa here last time out with Brad Friedel returning in goal for Hugo Lloris and Tom Huddlestone and Gylfi Sigurdsson replacing Mousa Dembele and Gareth Bale respectively.
And it was our Icelandic international who was involved in the first chance of the afternoon on four minutes, clipping in a free-kick 30 yards out which fell to Gallas but his attempted flick went past the post.
Chelsea’s first sight at goal came after 10 minutes when a clearance was collected by Brazilian Oscar who had time to settle himself before firing in a shot from 20 yards that drifted past Friedel’s right-hand post. And two minutes later at the other end, his compatriot Sandro had similar time and space on the edge of the Chelsea box following a corner, but his shot cleared Cech’s crossbar by some distance.
The opening goal came on 17 minutes, when Eden Hazard’s corner was headed away by Gallas but only as far as Cahill 10 yards out and he struck a vicious volley that flew past Friedel right down the middle of the goal.
We responded well though and three minutes later, Defoe won possession just inside the Chelsea half, broke forward on his own and let fly a typically accurate shot which Cech could only parry, before a combination of the Chelsea goalkeeper and Ashley Cole prevented Clint Dempsey pouncing on the rebound.
Without being free-flowing in possession we were still creating opportunities and again went close on 31 minutes. Huddlestone’s free-kick was cleared but we recycled possession and fed the ball out to Aaron Lennon. His chipped cross was deflected to Sigurdsson who turned and shot but his effort went just past Cech’s upright.
Chelsea’s attacking players continued to provide a threat on the break though and from one such burst through the middle six minutes before the break, Ramires slid the ball through to Mata whose first time shot was saved by Friedel, the rebound fell invitingly to the Spaniard but he blasted over from 12 yards.
The half ended with us on the front foot and it needed some last-ditch defending from the Blues to prevent parity at the interval. Just two minutes before half-time, Cahill blocked Dempsey’s shot for a corner and from the resulting set-piece, Dempsey latched onto a loose ball but this time John Obi Mikel threw himself in front of the shot to clear the danger and we went in a goal down at the break.
We needed an early response in the second period and we most certainly got one! Just two minutes in and the scores were level. Huddlestone delivered a deliciously teasing cross to the far post which Jan Vertonghen flicked back across goal and Gallas nodded in from a yard out to level the scores against his former club.
All of a sudden we were well on top, Sigurdsson hitting a volley which was deflected for a corner and then minutes later he cut inside Ivanovic and let fly but Cech saved well. Chelsea’s keeper was then tested again by Vertonghen with a stinging shot before we took the lead on 54 minutes.
Lennon, who was excellent once again, ran at the Chelsea defence before firing over a cross-shot which fell straight to Defoe and the England striker did what comes naturally and smashed the ball past Cech for his landmark goal.
A relative lull in proceedings followed before the tide turned again as the visitors came from behind to lead 3-2. They levelled on 66 minutes when Oscar’s cross from the right was cleared by Gallas but only to the oncoming Mata who took a touch and hit a low shot into the bottom corner.
It was Mata again three minutes later as Mikel played inside to Hazard, who played a first-time pass between defenders for Mata to beat Friedel with a right-foot shot from eight yards.
Mata then went close to a hat-trick but Friedel was equal to his attempted close range lob and Oscar tested the USA keeper with a shot that he saved low down to his right as the Blues enjoyed a spell of possession.
It meant we had to bounce back again and Andre introduced Jake Livermore and Emmanuel Adebayor for Huddlestone and Dempsey as we went for the equaliser. And it almost came when Lennon worked a yard of space on the edge of the Chelsea box but his effort was straight Cech, while Adebayor also went close when he latched on to a Cech parry moments later but couldn’t find the touch to send the ball goalwards.
Kyle Walker then almost produced another of his wonder goals, but his fierce 30-yard drive was superbly tipped round the post by the busy Cech.
Victory for the visitors was wrapped up in stoppage time shortly after as Mata won possession from Walker and his low cross was turned in by substitute Daniel Sturridge at the far post.
Spurs (4-2-3-1): Friedel; Walker, Gallas (capt), Caulker, Vertonghen; Huddlestone (Livermore 67), Sandro; Lennon, Dempsey (Adebayor 74), Sigurdsson; Defoe: Substitutes (not used): Lloris, Naughton, Dawson, Falque, Townsend.
Chelsea (4-3-3): Cech (capt); Ivanovic, Cahill, Luiz, Cole; Mikel, Mata, Ramires; Oscar (Sturridge 83), Torres, Hazard (Lampard 89). Substitutes (not used): Turnbull, Bertrand, Azpilicueta, Romeu, Moses.
Goals: Spurs – Gallas 46, Defoe 54. Chelsea – Cahill 17, Mata 66, 70, Sturridge 90+1.
Yellow cards: Spurs – Huddlestone, Gallas. Chelsea – Ivanovic, Ramires.
Referee: Mike Dean.