Jurgen Klopp's side patiently toiled in the sunny conditions during the first half, but Georginio Wijnaldum broke the deadlock shortly before the hour mark and James Milner made sure of the points with a late penalty.
The Reds had been knocked off the summit by Manchester City's narrow win over Tottenham Hotspur on Saturday, but the champions must now beat Manchester United at Old Trafford in Wednesday's derby to retain control of the topsy-turvy title race.
Regardless of whether they win the title or not, Liverpool have now broken their club record for number of points in a Premier League season and could end the campaign on 97 points but still miss out on the trophy.
As expected, Liverpool quickly assumed control of possession and territory in South Wales, but Cardiff packed men behind the ball and made it difficult for the visitors to break through, with the only notable sight of goal from the opening 20 minutes seeing Sadio Mane slice an effort high and wide.
The Reds should have taken the lead midway through the first half, though, when Mohamed Salah and Mane combined to set up Roberto Firmino, who lifted his effort over the bar when he only had Neil Etheridge to beat.
Liverpool's pressure increased as the half wore on and Mane had a half-chance to break the deadlock when he darted across his marker to meet Trent Alexander-Arnold's low delivery, only to fire over with a difficult finish.
Salah then came close just three minutes later when he span away from Bruno Ecuele Manga to leave himself through on goal, but Etheridge was quick off his line to thwart the Egyptian.
Cardiff spent the majority of the first half focused on containing Liverpool, but they did almost score against the run of play on the stroke of half time when a scuffed Victor Camarasa effort bounced into the path of Oumar Niasse, who could not get enough on his shot on the turn to really trouble Alisson.
Liverpool ended the half with 79% possession but were being made to work by the stubborn hosts, and Cardiff created another half-chance soon after the restart when Nathaniel Mendez-Laing swung a cross in to Sean Morrison, whose looping header landed on the roof of the net.
The visitors soon began to take control again, though, and both Mane and Alexander-Arnold fired off target from range as they patiently probed for a way through.
The breakthrough eventually came shortly before the hour mark as Alexander-Arnold turned provider with a low corner into the box, which Wijnaldum met with a thumping half-volley which left Etheridge no chance in the Cardiff goal.
Cardiff almost provided a quick response when Junior Hoilett drew a save from Alisson three minutes later, but Liverpool went straight up the other end and should have doubled their advantage when Mane teed up Jordan Henderson, who blazed over with the goal gaping.
Such a glaring miss almost proved costly when Cardiff created an even better chance four minutes later, but Morrison somehow missed the ball when going for a header after Alisson had flapped at a corner and left the goal open for what should have been a simple finish.
It was a major let-off for Liverpool, who also lost Fabinho to a head injury just one minute after he had come on as a sub, with Milner replacing the Brazilian on the insistence of the medical staff.
It proved to be an important moment too as Milner stepped up to take the penalty which sealed the points for Liverpool after Morrison was adjudged to have pulled Salah to ground inside the area by referee Martin Atkinson.
Milner made no mistake to send Etheridge the wrong way, taking Liverpool up to a club-record 88 points and leaving them two clear of Man City, who face a mouthwatering showdown with United at Old Trafford on Wednesday.
The win is also Liverpool's ninth in a row across all competitions - a feat they have not achieved since April 2014 - and their 10th consecutive win against promoted teams, which is another club record for the Premier League era.
CARDIFF (4-5-1): Etheridge; Peltier, Morrison, Ecuele Manga, Bennett; Hoilett (Murphy 83'), Camarasa, Gunnarsson, Ralls (Bacuna 79'), Mendez-Laing; Niasse (Zohore 67')
LIVERPOOL (4-3-3): Alisson; Alexander-Arnold (Gomez 86'), Matip, Van Dijk, Robertson; Henderson, Wijnaldum, Keita (Fabinho 71' (Milner 75')); Salah, Firmino, Mane