Like last season, Jurgen Klopp's side went into their final group match without qualification assured and needed at least a point to guarantee their progression in the competition they won.
Liverpool came out on top when the two sides met earlier in group, but squandered a three-goal lead, before eventually winning 4-3.
And both sides squandered numerous chances, with Salah and Salzbug's Erling Haaland -- who had scored in every Champions League game this season -- were the most guilty parties.
However, the breakthrough did come when Keita headed past a group of Salzburg defenders into the net from Sadio Mane's cross on 57 minutes.
Less than a minute later, it was 2-0 when Salah somehow found the net from an incredible angle after rounding goalkeeper Cican Stankovic.
"[Salah] played really well but didn't score in the situations we expect him usually to score, but staying on track and making such a decisive and very difficult finish, that probably says much more about him than all of the other goals he has scored," Klopp said after the match.
"Staying concentrated, belief in the next moment, it was brilliant. A very, very difficult goal but a sensational finish."
The second goal killed Salzburg's momentum and Liverpool continued to create chances on the counter, with Mane having a shot cleared over the bar.
Klopp was full of praise for Salzburg's first half display, which caused Liverpool numerous problems
"I couldn't have more respect for what Salzburg are doing," he said. "When you see how good they were in the first game, against Napoli and against Genk.
"We could have come here as reigning champions and misunderstood the situation, but I love how smart we were against them."
The result means Liverpool finish as group winners -- ahead of Napoli, who beat Genk 4-0 to secure their qualification -- with 13 points.
Information from Reuters was used in this report.