The 33-year-old midfielder has scored 159 goals in 630 appearances since making his debut in 1998.
The 18-time English league champions confirmed on their official website that Gerrard put pen to paper on the deal at Melwood on Monday.
"I think everyone knows what it means to me," Gerrard said.
"I've been here that long and so to extend, it's a big day for me and I'm really happy for myself and my family.
"It's great news.
"It lets me know the club thinks an awful lot of me and want me here.
"I'm glad it's all done and it's happened at the right time before the season, so I can just focus on playing as well as I can."
Having spent his entire career at the club, the deal further extends Gerrard's Liverpool love affair.
"It's fantastic for everyone - the club, Steven and the fans," said Ian Ayre, managing director of Liverpool.
"He is - and always has been - such a big part of Liverpool Football Club.
"Particularly in this day and age, it's rather unique to find a local player who has given his whole career to his club.
"We're pleased today to add an extension to his existing agreement and that keeps him here until the end of his career.
"We've said what we'll do in two years' time is review it again and see how happy Steven is.
"We seem to always be happy with him, so hopefully we'll just continue in that vein."