The Blues were beaten 2-1 at Aston Villa, but bailed out by a Gareth Bale brace which saw Tottenham come from 2-1 down to beat the Foxes 4-2.
Meanwhile, Liverpool beat Crystal Palace 2-0 at Anfield.
Going into the final day, Chelsea's midweek win over Leicester put them in a commanding position.
The Blues sat third on 67 points, with their two top-four rivals both on 66.
Liverpool held a goal difference of +24 and so sat fourth as Leicester's goal difference of +20 left them in the perilous fifth position.
However it was the Foxes who started fastest on Sunday as they took a 17th-minute lead thanks to Jamie Vardy's penalty.
Referee Anthony Taylor originally waved away protests after Vardy went down under Toby Alderweireld's challenge, but VAR advised him to look at the pitchside monitor and he changed his decision.
The striker calmly sent Hugo Lloris the wrong way.
Liverpool struck next, in the 36th minute.
Rhys Williams, who had missed a sitter from an earlier corner, flicked on Andy Robertson's set-piece and the ball dropped to Sadio Mane at the far post via Roberto Firmino and the Senegal international poked home.
At that point Liverpool moved up to third, with Leicester fourth and Champions League finalists Chelsea down in fifth.
This quickly changed again though as Tottenham levelled at Leicester.
Kane went ahead in the race for the Premier League's Golden Boot as he levelled for Spurs just four minutes before the break.
The England striker lashed home Son Heung-min's deflected cross to score his 22nd goal of the season, moving ahead of Mohamed Salah.
Another major twist came as Bertrand Traore fired Villa ahead just before the break when he met Matt Targett's corner.
His shot looped over Edouard Mendy and went in off the bar to leave Chelsea's Champions League hopes in the balance.
The Blues remained ahead of Leicester as all three games reached half-time, but merely on goal difference.
Thomas Tuchel was forced into a change at half time as Mendy injured himself attempting to save the goal and so was replaced by Kepa Arrizabalaga.
Leicester got their noses back in front at the King Power early after the restart with another Vardy penalty, after he was fouled by Davinson Sanchez.
And Chelsea's situation then worsened further.
Anwar El Ghazi made it 2-0 to Villa seven minutes after the break when he converted a penalty following Jorginho's foul on Traore.
The Blues thought they had a goal back through Timo Werner, but it was ruled out for offside as Cesar Azpilicueta went to early in the build-up.
Ben Chilwell pulled a goal back for Chelsea with 20 minutes left when he converted Christian Pulisic's cross.
Then the Blues received a major boost as Kasper Schmeichel made a rare error, conceding an own-goal from a Tottenham corner to make it 2-2.
This put Chelsea back into fourth position on goal difference once more.
At this point Liverpool doubled their lead through a second goal for Sadio Mane.
This all-but secured their position in next season's Champions League.
And then came the defining moment.
Gareth Bale broke Leicester's hearts in the 86th minute as he drilled home from just inside the penalty area after a fine move involving Son and Kane, who grabbed another assist.
Cesar Azpilicueta was sent off with two minutes left after catching Jack Grealish in the face.
However, Bale added another at Leicester to cement Chelsea's place in the top four.
The final table saw Liverpool third with 69 points, Chelsea fourth with 67 and Leicester fifth with 66.