The English midfielder made 710 appearances for Liverpool, scoring 186 goals.
Gerrard spent 17 years at his home-town club Liverpool, 12 as captain, and won seven major honours including the 2005 Champions League before finishing his career with an 18-month stint at LA Galaxy.
"Following recent media speculation surrounding my future, I can confirm my retirement from playing professional football," Gerrard said in a statement.
"I have had an incredible career and am thankful for each and every moment of my time at Liverpool, England and LA Galaxy."
Gerrard made 114 appearances for England, a tally bettered only by Peter Shilton, Wayne Rooney and David Beckham, and scored 21 international goals.
He appeared at six major tournaments, captaining England at the 2010 World Cup, Euro 2012 and the 2014 World Cup.
Although the Premier League title famously eluded him, he did win two FA Cups, three League Cups, the UEFA Cup, UEFA Super Cup and the Community Shield.
His finest hour came in Istanbul in May 2005, when he inspired Liverpool to come from 3-0 down against AC Milan at half-time of the Champions League final to win the club's fifth European Cup.
In total he made 710 appearances for Liverpool, scoring 186 goals.
"I feel lucky to have experienced so many wonderful highlights over the course of my career," Gerrard said.
"I am proud to have played over 700 games for Liverpool, many of which as captain, and to have played my part in helping the club to bring major honours back to Anfield, none more so than that famous night in Istanbul.
"At an international level, I feel privileged to have won 114 England caps and to have had the honour of captaining my country. I will always look back with great pride at every time I pulled on the England shirt."