The 26-year-old Egypt international joined the Reds for £34m from Roma last summer and has scored 44 goals in 52 appearances for the club.
His new deal, which runs until 2023, does not contain a release clause.
"It demonstrates two things very clearly - his belief in Liverpool and our belief in him," said Liverpool manager Jurgen Klopp.
Salah was the top scorer in the Premier League last season, netting 32 goals - the most by a player in a 38-game campaign - to win the Golden Boot.
His performances also helped him win last season's Professional Footballers' Association Player of the Year award and Football Writers' Association Footballer of the Year.Liverpool finished fourth in the league last season and lost the Champions League final 3-1 to Real Madrid.
Salah had to come off after half an hour against the Spanish giants in Kiev after suffering a shoulder injury.
The problem put his participation at the 2018 World Cup in doubt and he missed Egypt's opening game - a 1-0 defeat by Uruguay - before starting against Russia and Saudi Arabia.
Salah scored in both of those games but could not stop his country from losing and going out in the group stages.
Liverpool's players returned to pre-season training on Monday but Salah, other players involved at the World Cup and Netherlands duo Virgil van Dijk and Georginio Wijnaldum were not among them.
However, German keeper Loris Karius, who made two mistakes in the Champions League final and was later said to have been suffering from concussion after a collision earlier in the game, was one of the 26 back at Melwood.
New signings Naby Keit