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.
“This news can be seen for what it is; rewarding a person who performed and contributed greatly for the team and the club last season,” said Klopp.
“We want world-class talent to see they have a home at Anfield where they can fulfil all their professional dreams and ambitions – we are working hard together to achieve this.
“When someone like Mo Salah commits and says this place is my home now, it speaks very loudly I think.
“Equally, our commitment to him says we see his value and want him to grow even more and get even better within our environment.”
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 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.
There is one thing that is virtually certain about Salah’s new contract – it won’t reach its conclusion.
One of two things will happen before 2023, either Salah will sign another Liverpool deal, or he will be sold. Liverpool will fervently hope it is the former.
The Egyptian scored so many goals in his debut campaign that the Reds hierarchy felt it was right to reward Salah. Salah is happy at Anfield, so extending his contract was a no-brainer.
It is a club protecting its asset and a player having his excellence acknowledged.
What Liverpool will try to do now is bridge the remaining gap between the undoubted progress made under Jurgen Klopp last season and what is needed to become consistent challengers for major honours – not just in one tournament in one season, but across the whole spectrum, every year.
If they do that, coupled with the club’s standing as one of the most famous names in the global game, they can be confident about keeping players like Salah rather than selling them on, as was the case with Luis Suarez four years ago and Philippe Coutinho in January.