Everton striker Louis Saha scored twice as Chelsea saw their lead at the top of the Premier League cut to one point.
Florent Malouda put Chelsea ahead with a shot across goal but Saha headed Everton level from a corner after his clever run lost marker John Terry.
Saha should have put the home team ahead but Petr Cech saved his penalty.
The Everton striker smashed his second with a crisp finish after Terry failed to clear, while Didier Drogba later headed against the woodwork.
The result was no less than Everton deserved after a performance of skill and determination - and it ensured that David Moyes's 300th game as a Premier League manager ended with his first victory over Chelsea.
The visiting team would have lost top spot if Manchester United had won at Aston Villa but Sir Alex Ferguson's team were held to a 1-1 draw.
Carlo Ancelotti's Chelsea certainly had their moments and pushed hard for an equaliser after Saha scored for the second time after 75 minutes.
But Chelsea were far from their best as they lost for the fourth time in the league this season, with all of their defeats away from Stamford Bridge.
They lacked cohesion in attack and were uncharacteristically uncertain in defence - with none more so than former England captain Terry, who was at least partially to blame for both goals.
There was little hint of what was to follow when a scrappy and unremarkable opening period ended when Chelsea took the lead with a disarmingly direct move.
Didier Drogba lost his marker and flicked on a long, raking kick up field by Petr Cech that Malouda chased down, giving Phil Neville the slip in the process before smashing across goal with a crisp first-time strike.
The only real notable moment of craft and invention prior to the 16th-minute opener had fallen to Frank Lampard after Nicolas Anelka dummied a low cross from Ashley Cole, but the England midfielder shot wide from 20 yards.
Everton's marking was occasionally slack and Tim Howard was forced into action after Terry was left unmarked at a corner.
But it was Terry who was at fault with Everton's equaliser, failing to track Saha's superb run towards the near post that culminated with the striker heading beyond Cech.
Anelka was a largely peripheral figure but should have restored Chelsea's lead after the heavily involved Drogba cut the ball into the path of the French striker, who missed the target with his first-time effort from six yards.
The contest really came to life in the closing stages of the opening half, with Cech first denying Saha and then shortly afterwards saving the Frenchman's penalty after Ricardo Carvalho tripped the impressive Landon Donovan.
It was a poor spot kick from Saha, whose effort lacked power and was struck at a good height for the keeper.
Cech was the first stopper called into action after the restart, tipping over a miscued cross from the recalled Diniyar Bilyaletdinov that almost crept under his crossbar.
Chelsea were struggling to cope with Everton's high-tempo game and another mistake from Terry created a shooting chance for Saha, whose shot appeared to be deflected wide even though Alan Wiley awarded a goal kick.
The visiting team's cause was not helped when Ashley Cole limped off after a challenge with Donovan, while Branislav Ivanovic made a vital block to deny Bilyaletdinov.
Michael Ballack replaced Cole and Salomon Kalou came on for Anelka and Chelsea did appear to be inching their way back into the contest before Saha smashed the winner.
Terry failed to deal with a long cross-field pass that Saha controlled with his first touch before striking the ball beyond Cech with the outside of his left boot.
Replays suggested that Cech might have at least got a hand to the ball.
Chelsea immediately went on to the offensive and Drogba almost restored parity with a thumping header that rebounded off the crossbar, while Howard was at full stretch to save a low strike from Lampard.