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 AQsyfprQjzUThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…