Houston Dynamo had led at half-time through Calen Carr’s fierce strike, but an Omar Gonzalez header and Landon Donovan’s cool penalty turned the match around.
A second spot-kick, dispatched by Robbie Keane in injury-time, completed the victory in Los Angeles.
David Beckham, 37, was then substituted to cheers and a standing ovation.
“I am sad that this is the end,” said David Beckham.
“This is a very special place for me and it will continue to be. I am happy to have been part of this club for six years and I am grateful to have been successful for the last four years.
“I may not play here anymore but I remain just as committed to growing this club, this league and this sport.”
David Beckham has been linked with moves to Paris St. Germain and Monaco, but insisted that he had “no idea” where he would be playing next.
It is the second time he has lifted the MLS Cup – LA Galaxy beat the same opponents 1-0 in last year’s showpiece.
The former England captain also appeared in the 2009 final when Galaxy were beaten in a penalty shoot-out by Real Salt Lake.
David Beckham came close to a fairytale ending, but lacked the yard of pace required to get on the end of an inviting cross in the final 10 minutes.
Instead the former England captain was removed by coach Bruce Arena in the dying moments, embracing both team-mates and opponents as he headed to the sidelines.
David Beckham, who made a record 115 outfield appearances for England, was part of the Manchester United side that famously beat Bayern Munich to win the 1999 Champions League.
He left Old Trafford for Real Madrid in 2003, before agreeing his move to LA Galaxy in January 2007 and making his debut for the franchise in August in that year.
David Beckham attracted criticism from some Galaxy fans after agreeing loan moves to AC Milan in 2009 and 2010 which meant missing some of the MLS season.
But, before lifting the trophy draped in a union flag, his final post-match interview was met by universal acclaim from the home fans.
wo3sUMqBr5I AQsyfprQjzUQuincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…
Misleading allegations, rumours and outright lies about voting and fraud are flooding online spaces in…
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…