San Jose received $100,000 in general allocation money and $100,000 in targeted allocation money in the deal, and could yield an additional $50,000 in GAM based on his 2018 performances.
Bingham is out of contract and will need to sign a new MLS deal before officially joining the Galaxy.
The 28-year-old made 96 appearances over seven seasons with the Earthquakes, setting a club record with 12 shutouts in 2015 before earning MLS All-Star honors in 2016. A Northern California native, Bingham has made three appearances for the U.S. national team since debuting in 2016.
"We want to thank David for everything he's given to the Quakes," Earthquakes general manager Jesse Fioranelli said in a news release. "He's been an important part of the team for the last seven seasons and we wish him well in LA."
Bingham had earned a U.S. call-up as recently as March but was benched by San Jose in August, with Andrew Tarbell starting the club's final 12 MLS matches of 2017.
Sigi Schmid's Galaxy have no goalkeepers on their roster after sending Brian Rowe to the Vancouver Whitecaps and Jon Kempin to the Columbus Crew, with Clement Diop taken by the Montreal Impact in the waiver draft.