Beckham's royal return ends in defeat
After Landon Donovan had equalised for the Galaxy, the game was suspended in the 83rd minute due to a thunder storm which kept the players in the changing rooms for an hour.
Beckham was substituted when play finally resumed in front of a near-deserted stadium.
With two minutes left, Dallas midfielder Brek Shea grabbed the winner with a cross-shot which caught out Galaxy's Jamaican keeper Donovan Ricketts.
The Galaxy remain on top of the Western Conference with 15 points, three ahead of Real Salt Lake, whose disappointing week continued with a 1-0 loss at the Portland Timbers following their defeat to Monterrey in the final of the CONCACAF Champions League.
Kenny Cooper's close-range effort in the 22nd minute ended RSL's 18-game regular season unbeaten run and maintained Portland's 100 percent home record.
French forward Sebastien Le Toux's 76th-minute penalty gave 10-man Philadelphia Union a 1-0 win over the San Jose Earthquakes after they had defender Jordan Harvey sent off four minutes before the interval.
The New York Red Bulls remain a point clear of the Union after English forward Luke Rodgers continued his good form with his third goal in as many games in the 1-0 win over Sporting Kansas City.