Liverpool needed a Hugo Lloris error to beat Tottenham 2-1 last time out and they rode their luck again at St Mary's Stadium on Friday, Jurgen Klopp's side showing their nerves.
Shane Long's 50th Premier League goal had put Southampton into an early lead but Naby Keita's first strike for Liverpool ensured the scores were level at the interval.
Salah's dry spell has been well-documented but he ended his eight-game wait for a goal in the 80th minute, embarking on a long solo run before finishing superbly.
And captain Jordan Henderson then made sure of the win for the Reds with four minutes to go by turning home a Roberto Firmino low cross, as Klopp's men went two points clear at the top, albeit having played a game more than City.
Liverpool made a slow start and Southampton led in the ninth minute.
Ryan Bertrand was given too much time and space to deliver a left-wing cross that Pierre-Emile Hojbjerg flicked on at the near post, with Long left unmarked to sweep home.
Sadio Mane directed a free header straight at Angus Gunn in response before Virgil van Dijk turned another dangerous Bertrand cross over his own crossbar.
Gunn was beaten in the 36th minute, though, Liverpool keeping Southampton pegged in and Keita heading home Trent Alexander-Arnold's cross at the end of a sustained period of pressure.
James Milner and Henderson had been left out of the starting line-up by Klopp but he turned to the duo early in the second half as Liverpool struggled to break Southampton down.
Keita appealed for a penalty but appeared to go down easily under Maya Yoshida's challenge, with Liverpool needing Salah to break his drought to nudge ahead.
The goal came from a Southampton corner, with Henderson sending Salah on a long run through the Saints half, the Egypt forward keeping cool to beat Gunn from the edge of the box.
Southampton, not yet sure of avoiding relegation, had to throw men forward in search of an equaliser and Liverpool duly killed the game with a clinical break, Firmino teeing up Henderson as the Reds moved back above City.
What does it mean? Pressure back on City
As Liverpool struggled in the second half, it seemed like the advantage would go to City.
But instead, Pep Guardiola's side will have to wait until a week on Sunday to respond to Liverpool's latest late show, when the defending champions go to Crystal Palace.
The title race looks set to go to the wire and the fight against relegation could do the same, with Southampton still only five points clear of the bottom three after surrendering their lead.
Salah finds form
Liverpool had been unable to get Salah in the game for large periods but when a chance to stretch his legs finally came in the closing stages, the forward showed he has ice in his veins.
Salah bristled in midweek at suggestions his performance levels have dropped this term and he might just have a point. This was his 18th Premier League goal of the season, with only Sergio Aguero more prolific.
If Salah can fire in the coming weeks, Liverpool's hopes of domestic and European glory will be boosted.
Gunn misfires in Saints goal
Formerly of Manchester City, 23-year-old goalkeeper Gunn would have hoped to do his old club a favour in the title race.
But he really ought to have done better with Keita's equaliser, getting down low quickly enough to block the header but only succeeding in parrying the ball into his own goal.
There was little he could do about Salah and Henderson's late goals, however.
Key Opta Facts
- Liverpool have beaten Southampton in four successive league games for the first time in the club's history.
- Southampton have now lost 23 points from leading positions in the Premier League this season, more than any other side in 2018-19.
- Following their come-from-behind victory, Liverpool have now won 16 points from losing positions in the Premier League, the most of any side this season.
- Liverpool became the seventh club in English top-flight history to concede 5000 such goals after Everton, Manchester City, Aston Villa, Newcastle, Sunderland and Arsenal.
- Henderson is the first Premier League substitute to score a goal, assist a goal and receive a yellow card since Graziano Pelle did so against Crystal Palace back in May 2016.
- Keita’s goal for Liverpool was his first Premier League goal of the season from what was his 23rd shot in the competition. Indeed, he is the third player from Guinea to score such a goal after Kamil Zayatte and Titi Camara.
- Long is the fourth player from the Republic of Ireland to register 50 Premier League goals, along with Niall Quinn (59), Robbie Keane (126) and Damien Duff (54).
Liverpool are back at Anfield on Tuesday for the first leg of their Champions League quarter-final with Porto before hosting Chelsea in the Premier League five days later. Southampton's next game is at home to Wolves in the league on Saturday.