Keane slalomed his way through Dallas' defence in the 24th minute before unleashing a drive into the top left corner of the net to put Galaxy 1-0 ahead, and Gyasi Zardes doubled the hosts' advantage just before half-time.
Although the visitors hit back in the final half hour through Tesho Akindele, Galaxy held on for their first victory in five games, while Dallas' winless run stretched to six matches.
LA moved on to 12 points for the season to sit sixth in the MLS' Western Conference, just outside the play-off positions, while Dallas remain third on 17.
With key man Landon Donovan having joined the United States' squad for the FIFA World Cup, Galaxy lacked creativity early and barely fashioned a genuine chance until Keane's flash of inspiration.
Keane received a pass from Zardes 20 yards out, skipped past two markers and shot between a pair of Dallas defenders to beat the outstretched right hand of visiting goalkeeper Raul Fernandez.
In the 44th minute, Keane started a move that led to Galaxy's second goal, getting the ball on the left before teeing up Juninho, whose cross was headed home by Zardes.
Galaxy coach Bruce Arena would have been worried when Akindele struck for Dallas with 25 minutes remaining, but they managed to hold on at Stubhub Center.
In Wednesday's other MLS fixture, goals from Chris Rolfe and Fabian Espindola were enough for DC United to triumph 2-0 over Houston Dynamo.
The victory took United to 18 points and second position in the Eastern Conference, while Houston dropped to fourth on 17.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.