Media playback is not supported on this device
The former England midfielder, 34, will play for the Major League Soccer club after his contract at Anfield expires.
"We were aggressive in our pursuit of Steven and look forward to his contributions on and off the field," Galaxy president Chris Klein said.
"I'm very excited to begin the next chapter of my career in the United States," Gerrard added.
Media playback is not supported on this device
"The Galaxy are the most successful club in MLS history and I'm looking forward to competing for more championships in the years to come.
"One of the reasons I chose them was because of the success they've had recently. I want to add some medals and trophies to my collection."
Gerrard, who has won 10 trophies at Liverpool, including the Champions League in 2005, becomes the second England captain to join LA Galaxy, after David Beckham played for them between 2007 and 2012.
"We're very pleased to acquire a player of Steven's calibre, experience and character," said head coach and general manager Bruce Arena.
"He is one of the most decorated players in the world and will join our team with a wealth of success playing at the highest level of the sport.
"Steven will be an excellent example to our young players and we're excited to add him and his leadership to an already-talented roster."
Liverpool captain Steven Gerrard will join Los Angeles Galaxy in July, the American side have confirmed.