The Reds were initially frustrated by the Hatters, who opened the scoring early in the first half against the run of play courtesy of a close-range header from Chiedozie Ogbene.
However, two goals in the space of just 125 seconds midway through the second period turned the game on its head in remarkable fashion, with Alexis Mac Allister setting up both Virgil van Dijk and Cody Gakpo to head home from close range.
Luis Diaz and Harvey Elliott then got their names on the scoresheet to help the Reds battle past a spirited Luton outfit and register their 18th Premier League win of the campaign.
Despite the absence of several star names through injury, Jurgen Klopp's side got the job done to consolidate their place at the top of the table, moving four points clear of second-placed Manchester City and five ahead of third-placed Arsenal, who both have a game in hand.
As for Luton, they missed the chance to climb out of the relegation zone, and as a result of three successive league defeats, Rob Edwards's men remain 18th in the table, albeit level on points with Everton in 17th spot.
While Luton named an unchanged side to the one that began the 2-1 loss to Manchester United last weekend, Klopp made five changes to the Liverpool team that beat Brentford 4-1 last time out, with Diogo Jota, Curtis Jones, Darwin Nunez - all injured - Ibrahima Konate and Andrew Robertson all making way for Gakpo, Elliott, Ryan Gravenberch, Joe Gomez and Jarell Quansah.
Star attacker Mohamed Salah was left out of the Reds' matchday squad due to injury, with Klopp's depleted bench included a quintet of youngsters, most notably 16-year-old Trey Nyoni.
Liverpool made a fast start to proceedings, with Diaz heavily involved down the left flank before carving out the game's first real chance from the edge of the penalty area, curling a shot narrowly wide of Thomas Kaminski's post, before an acrobatic effort from Gakpo flew straight at the Luton goalkeeper.
Edwards's side began on the back-foot, but they responded well and took surprise lead in the 12th minute when Alfie Doughty, Cauley Woodrow and Tahith Chong all combined down the left before the latter's cross pinged off Caoimhin Kelleher into the path of Ogbene, who headed the Hatters in front from close range.
Luton's opener was certainly not in the script for Liverpool, who initially lost their momentum before creating a plethora of chances, mostly through Diaz who struck six shots on goal within the first half-hour to no avail.
Kaminski comfortably kept out efforts from Diaz and Gravenberch, before Teden Mengi produced a superb tackle inside the area to deny another chance for Liverpool's No.7.
Elliott, who made his 100th appearance for the Reds, huffed and puffed as one of the hosts' chief creators, but Luton's gameplan to frustrate Klopp's side was executed to perfection and they entered the half-time break the happier of the two teams.
Frustrations seeped into the second half for Liverpool, with goalkeeping coach John Achterberg booked by on-field referee Andy Madley just a few minutes after the break, before penalty appeals from the hosts were waved away after a fierce shot from Diaz cannoned off Mengi before hitting the arm of Gabriel Osho.
Liverpool then turned the screw in front of a fired-up Anfield crowd, and two perfectly-weighted deliveries from Mac Allister proved to be the catalyst to turning the contest on its head for the Reds just before the hour mark.
The Argentine World Cup winner registered his first assist on the night when his whipped corner kick was met by the towering presence of Van Dijk, who lost his marker before thumping home a header to restore parity on his 250th start for Liverpool.
Anfield then erupted when Mac Allister collected a throw-in from Conor Bradley on the right side of the penalty box before hooking a first-time cross towards Gakpo to flick a header beyond Kaminski from just a few yards out.
If any Liverpool player deserved a goal it was Diaz, who worked his socks off all night in the final third and was eventually rewarded when he dropped the shoulder to glide past Mengi inside the box before burying a left-footed finish past Kaminski at his near post.
Eighteen-year-old Jayden Danns came on in the closing stages to make his senior debut and the attacker was heavily involved in Liverpool's fourth goal on the 90-minute mark, with his smart through-ball cleared and picked up on the edge of the area by Elliott, who whipped a superb first-time finish into the top corner.
Elliott's strike has seen Liverpool become the first Premier League team to score 100 goal across all competitions this season, and they can enter Sunday's EFL Cup final duel with Chelsea at Wembley Stadium in buoyant mood.
As for Luton, they shift their focus to a challenging FA Cup fifth-round tie against holders Man City at Kenilworth Road next Tuesday.