Even when Manchester City seemed to be running away with the Premier League title—the richest club in English soccer with the most expensive squad doing what it was built to do—manager Pep Guardiola couldn’t help but look over his shoulder.

It was February and City had a six-point lead atop the standings and most of its rivals had been cut hopelessly adrift. Yet one team was lurking too close for comfort. Liverpool was somehow still there, the same Liverpool that has been a thorn in Guardiola’s side for nearly as long as he’s been in England.

“They have been our biggest rivals in the past few seasons and are always there,” Guardiola said then. “A pain in the ass, all the time.”

Liverpool is even more uncomfortable to him now. The club has narrowed the gap over recent weeks and will go into Sunday’s matchup in Manchester trailing City by just one point with eight games remaining in the season. The Premier League doesn’t have a Super Bowl, but a potential title-deciding clash in April is as close as it may come.

But the surprising thing about it isn’t that this is happening. It’s that this is happening again.

What was supposed to be Manchester City’s era of unchecked dominance, led by Guardiola and backed by a fortune from Abu Dhabi, has instead turned into an annual two-horse race with Liverpool. And where others have failed to keep up, Liverpool kept itself on City’s tail not only with a level of spending in the transfer market that is unprecedented in the club’s history, but with a success rate that might be unprecedented anywhere.

“What is sure is that Liverpool and City in the last years, we have raised the bar,” Guardiola said. “We have raised the targets the Premier League had before.”

It’s no coincidence that the four highest points tallies in Premier League history have all been posted by Liverpool and City in the past three seasons. (The real heartbreaker for Liverpool was the 2018-19 campaign, when it amassed a mind-boggling 97 points only to lose the title by one.) That relentless consistency has set the two clubs entirely apart, leaving the other would-be challengers in a bumbling peloton behind them. Since the start of the 2017-18 season, City has racked up 438 points in the league while Liverpool has 412. No one else has managed more than Manchester United’s 338. The gap is essentially a full season’s worth of points.

Liverpool’s Jürgen Klopp, left, and City’s Pep Guardiola have become annual sparring partners at the top of the Premier League table.

Photo: MARTIN RICKETT/Pool via REUTERS

“If I would be a different person I would be, probably, a little bit depressed about the fact that Pep Guardiola is constantly coaching these kind of teams,” said Liverpool manager Jürgen Klopp.

Yet only Liverpool and Klopp found a way to live with them. Manchester United spent $800 million on players in five years, only to wind up in a pitched battle for fourth place with a disjointed squad, a temporary manager, and a plodding Cristiano Ronaldo up front. Chelsea has been undone by inconsistency. Tottenham Hotspur is on its third manager since losing the 2019 Champions League final. And Arsenal is still in the midst of a rebuilding project around a young core that isn’t yet ready to compete.

“We have pushed each other a lot and I think that other teams have realized they have to push more to chase us,” Guardiola said.

While some clubs have tried and failed to close the gap to City by matching the club’s spending, Liverpool worked out a high-wire act of nailing a near-perfect transfer policy: it spends big, but it never misses. By constantly reinventing itself, Liverpool has cemented its role in the modern Premier League as the only team that can keep up with City.

Liverpool has only signed eight players for 20 million Euros or more since the summer of 2017. Five of them are now automatic starters, including top scorer Mohamed Salah, goalkeeper Alisson, and its immovable object on defense, Virgil van Dijk. The remaining three are all valuable contributors to Klopp’s rotation, despite being occasionally hampered by injury. And there hasn’t been a flop in the bunch.

Liverpool had managed to identify players who can contribute immediately and seems to have pulled off the trick again this year, adding defender Ibrahima Konate in the summer (he has made eight starts in the Premier League) and forward Luis Diaz in January. Diaz already has two goals in six league appearances.

This kind of easy plug-and-play shopping for talent used to be the exception instead of the rule on Merseyside. When co-owner John W. Henry first acquired the club in 2010, the man who had brought World Series titles back to the Boston Red Sox was determined to apply the same Moneyball thinking to soccer. He was so committed to the idea that he even approached the Oakland A’s Billy Beane.

The tactic required some expensive fine-tuning. After a string of missteps over the course of half a decade, the club finally began reaping the fruits of its intensive, data-driven scouting when combined with Klopp’s masterplan for Liverpool’s style. He wanted defenders who could attack and attackers who could defend. And absolutely everyone needed to be fast. It was the only way to make his high-pressing game work.

It all came together in spectacular fashion when Liverpool reached back-to-back Champions League finals in 2018 and 2019, and then won the Premier League in 2020. Fans would have been forgiven for thinking that was their window. Klopp had held the squad together for three seasons, maintained the team’s furious rhythm, and seen it all pay off with the title Liverpool had been waiting three decades to claim. Legendary Manchester United manager Alex Ferguson used to say that a group of players’ natural cycle for success was four years. Liverpool should have been reaching the end.

Instead, the club slowly started replacing key parts. Forward Roberto Firmino, one of the most important pieces of Klopp’s first team, began ceding minutes to the all-round attacking threat Diogo Jota. And Diaz, Liverpool’s latest signing, is preparing to take over up front should Salah or Sadio Mane leave this summer.

Klopp knows that even if it means replacing fan favorites, he has no choice but to keep turning over the squad to cope with City’s depth, with its endless supply of talent, and with Guardiola.

“I respect a lot what they do, it’s an insane football team,” Klopp said. “And, for me, the world’s best manager. So, that’s a combination which makes it quite tricky. But, the good news: they are human beings as well.”

Write to Joshua Robinson at Joshua.Robinson@wsj.com