The win allowed West Ham to dislodge Chelsea and move back into fourth place in the Premier League in pursuit of Champions League qualification for the first time.
Leicester are third, five points clear of fifth-placed Chelsea, with the top four guaranteed a place in Europe's elite club competition.
Premier League: VAR penalty controversy leaves Manchester United frustrated after draw against Chelsea; Liverpool end losing streak
Liverpool took advantage of dropped points for Chelsea to move within two points of the top four by ending a four-game losing streak with a 2-0 win at Sheffield United.
The 23-year-old winger had been tipped for a call-up to the England squad for three World Cup qualifiers next month after scoring 13 goals this season to help the Foxes into third in the Premier League.
Premier League: Arsenal impress with comeback win against Leicester, Gareth Bale stars as Tottenham beat Burnley
The defeat left Leicester in third place, trailing leaders Manchester City by 13 points with 12 games remaining.
Premier League: Manchester City beat Tottenham to extend lead to seven points; Liverpool stunned by Leicester
Pep Guardiola's side stretched their English top-flight record run to 16 successive victories in all competitions.
Premier League: League-leaders Manchester City thrash Liverpool; Harry Kane inspires Tottenham to win
Inspired by Gundogan's goals and Phil Foden's stylish display, City moved 10 points clear of fourth-placed Liverpool after their first win at Anfield since 2003.
Gray, 24, was out of contract at Leicester at the end of the season and has signed for Leverkusen until June 2022 for a reported transfer fee of $2.7 million.
Premier League: Mohamed Salah stars as Liverpool beat West Ham; Leandro Trossard's goal helps Brighton beat Tottenham
Jurgen Klopp's injury-hit champions appeared to have lost their way after a five-game winless spell but are back on track after beating Tottenham and West Ham in the space of 72 hours.
Premier League: Manchester United's title hopes take major hit; Chelsea's Thomas Tuchel era starts with stalemate
Burnley beat Aston Villa 3-2 to pull nine points clear of the relegation zone, thanks to Chris Wood's late winner.
Rodgers had spoken earlier in the week of getting the best out of Vardy in the time he has remaining at the top as he has also been hindered by a recurring hip problem.
Premier League: Leicester pile more misery on Chelsea to go top; Michail Antonio fires West Ham to win
Leicester beat Chelsea 2-0 on Tuesday to jump above the two Manchester clubs, United and City, and reach the midway stage of their league campaign in first place.
Premier League: Mason Mount helps Chelsea end barren run against Fulham; Leicester go second after beating Southampton
Mason Mount put Chelsea back on track with the late winner that sealed a vital 1-0 victory at 10-man Fulham.
European football matchday: Chelsea visit stubborn Fulham in Premier League; PSG aim to secure top spot in Ligue 1
After a six-game run featuring four losses, Chelsea's expensively assembled team has dropped to ninth place — 10 points off the lead — ahead of a London derby at Fulham in the Premier League.
Leicester have played a game more than several of their rivals in a wide-open title race, with just seven points separating Liverpool and United from West Ham in 10th.
Premier League: Roberto Firmino's late winner helps Liverpool beat Tottenham; Arsenal draw with Southampton
Tottenham boss Mourinho was incensed with the antics of Liverpool manager Klopp and his coaching staff, claiming they set out to influence the decisions of the officials with constant complaints on the touchline.
Premier League: Fulham move out of relegation zone with win over Leicester; West Ham beat Aston Villa
Fulham had missed three of their four previous penalties this term, but Cavaleiro held his nerve to convert from the spot for the crucial second goal.
Premier League: Brendan Rodgers jokes he 'got lucky' after Leicester City beat Marcelo Bielsa's Leeds United
Brendan Rodgers' Leicester have made their joint best-ever start to a top-flight campaign, even better than when they won the title in the 2015/16 campaign.