Liverpool arrived at Ibrox under pressure following a weekend loss to Arsenal, which dropped Jurgen Klopp's team to 10th in the Premier League table.
Rangers stunned their visitors in the 17th minute with a goal from Scott Arfield, before Roberto Firmino equalised.
The Scots, however, succumbed in the second half, as Firmino's second goal and Darwin Nunez's first Champions League goal for Liverpool put the game to bed for last season's losing finalists.
Salah came off the bench and scored a treble in six minutes, breaking Bafetimbi Gomis' 2011 record.
Liverpool moved within a point of the next round after Harvey Elliott sealed a 7-1 victory late in the game.
Salah scores fastest Champions League hat-trick
“Everyone expected us to win from the outside, but we're taking it one game at a time,” Virgil van Dijk told BT Sport. We recognise that we are in a difficult period.
Earlier, Napoli advanced, extending their unbeaten start to the season with a 4-2 home victory over Ajax.
Hirving Lozano and Giacomo Raspadori scored inside the first 16 minutes as the hosts got off to a fast start against a team they thrashed 6-1 the week before.
Davy Klaassen and Steven Bergwijn scored for Ajax in the second half, but Khvicha Kvaratskhelia and Victor Osimhen scored for Napoli, who now have four wins in a row.
To maintain their lead, Ajax must defeat Liverpool the following week in Amsterdam.