Sterling, still 18, has broken into the first-team picture to great effect at Anfield this season and has so far made 25 appearances for Brendan Rodgers' men.
He made his England debut against Sweden last month and the told the club's official website: "It's every 18-year-old's dream. I'm just really grateful to be at such a big club like this."
He added: "There's a lot more to be done. I haven't begun yet, as the manager has said. Hopefully I can kick on after the New Year and try to do my best for the team and the football club."
Sterling moved to Liverpool from QPR in February 2010 and made his debut as a substitute against Wigan in March.
The arrival of Rodgers proved to be the catalyst for a more consistent run in the team, with his England debut then making him Liverpool's youngest-ever international.
Managing director Ian Ayre said: "This is another positive step forward for the football club in securing the long-term future of one of the country's brightest young talents.
"The negotiations were very positive and both parties acted in a very responsible way to reach an outcome that benefits both Raheem and Liverpool FC.
"Since the summer, Luis Suarez, Daniel Agger, Martin Skrtel, Jonjo Shelvey and Suso have all signed new long-term contracts and it's a clear indication of our intent to keep the players we believe are crucial to bringing success on the pitch.
"It also shows the belief the players have in the vision and leadership of Brendan Rodgers and everyone at this football club."
- Sports & Recreation
- Brendan Rodgers