Gerrard, 33, has spent his entire 15-year professional career at Liverpool where he has scored 158 goals in 630 appearances.
"I think everyone knows what it means to me," Gerrard said in a statement on Liverpool's website.
"I've been here that long and so to extend, it's a big day for me and I'm really happy. It's great news.
"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," Gerrard added.
Liverpool managing director Ian Ayre is hopeful Gerrard would end his career at the club.
"We've said what we'll do in two years' time is review it again and see how happy Steven is," Ayre said.
"We seem to always be happy with him, so hopefully we'll just continue in that vein."
Photograph: Michael Regan/Getty Images
Moyes braced for 'impossible' task at Manchester United
Does DRS need improvement? Aus media thinks so
Murray's Wimbledon hopes boosted by Ferguson's advice
Gerrard and wife soak up the sun on 6th wedding anniversary
Anderson heroics helps England 'sneak home' in thriller