The winner came in the 55th minute. Keane fed Mexican newcomer Giovani dos Santos into the penalty area. The forward's first effort was blocked by Dan Kennedy, but dos Santos chipped it far post, where Keane headed it home.
It was Keane's 13th goal of the campaign and 66th in 100 MLS games.
Dallas went up 1-0 in the 33rd minute. Michael Barros won a loose ball at midfield, avoided a sliding tackle, and slipped it past Donovan Ricketts short side.
The Galaxy tied it in the 51st minute. A through ball from Steven Gerrard led Robbie Rogers down the left wing. His left-footed service found Keane in the box and he deposited his header into the corner.
Los Angeles (12-7-7) has a three-game winning streak. FC Dallas, winners of five of their previous six, fell to 11-7-5.