The 26-year-old joined the club from Southampton on a five-year contract in June 2016 for a fee of £34m.
Since then he has gone on to make 89 appearances in all competitions for Jurgen Klopp’s side, scoring 40 goals.
“I am very happy to extend my time at Liverpool. It is a great day for me and I have made the best decision in my career,” he said.
Talks over the new deal, which is believed to run until 2023, were opened at the end of last season but have only been finalised now.
“I am looking forward to everything – to helping the team, to helping the club achieve our dreams and, especially, to win trophies,” he added.
“I’ve always said, when I knew I had a chance to come here I didn’t have to think twice. The right club in the right moment and with the right coach as well. I came here and was very happy.”