CARSON, Calif. -- Robbie Keane scored a hat trick as the LA Galaxy tightened the fierce race for Western Conference playoff spots, rallying from a second-half deficit for a 4-2 victory in a sizzling encounter with visiting Real Salt Lake.
Keane scored in the 56th, 67th and 86th minutes, giving him 10 goals this season, and Omar Gonzalez headed home a Landon Donovan corner kick in the 75th as LA (11-9-4) climbed within four points of first-place RSL.
The Utahns (12-8-5), who have won just once in their last five matches, watched their lead in the West trimmed to just two points over Colorado.
Joao Plata gave RSL a lead eight minutes into the second half, but the Galaxy, who had far more control of the game, were dominant from that point, claiming their third straight home victory and extending their unbeaten streak at the StubHub Center to six games.
Real Salt Lake returned to its traditional 4-4-2 with a diamond midfield after using a 4-3-3 in last week's win over Houston.
The Galaxy attacked in waves in the first half, often through a counterattack, but created few real chances. When they did, Tony Beltran, Nat Borchers or Chris Wingert came up with big stops -- Beltran twice in the box on Keane, in the 32nd and 44th minutes -- or goalkeeper Nick Rimando did the job.
RSL moved the ball well in the middle third but struggled to penetrate deeper until after the break, when Alvaro Saborio challenged Penedo with a blast to the upper-right corner. Penedo parried it, then handled a Morales blast from the right byline moments later.
Plata struck in the 53rd minute, slotting past Penedo from a superb touch by Ned Grabavoy. Borchers collected an LA clearance near midfield and quickly played it forward to Grabavoy just above the Galaxy box. Grabavoy sliced it to the streaking Plata, who got behind Gonzalez to finish.
Keane evened the score three minutes later. He took a long ball from Hector Jimenez at the top of the box, juked defender Carlos Salcedo the ground, cut the ball back to his right foot and fired inside the right post.
Donovan nearly added a second for LA two minutes later, taking a through ball from Keane, beating Nick Rimando at the 6-yard box, then chipping toward a nearly open net. Chris Wingert chested the ball on the goal line, keeping it out of the net, and it was cleared.
Keane's winner was a beauty. Juninho played the ball into space up the right wing, and Franklin, who had come on moments earlier, ran onto it and crossed to the near post. Keane volleyed home from just above the 6-yard box.
Gonzalez scored in the 75th minute, nodding in Donovan's corner kick from the left, then started his celebration in Borchers' face. Borchers was wrapped around Gonzalez through the play.
Keane wrapped up his hat trick after Franklin played a ball over the RSL backline. The Irish striker raced beyond Borchers and Salcedo and lifted the ball over an onrushing Rimando into the net.
Todd Dunivant nearly gave LA a fifth goal a couple of minutes later, but he was cleared off the line by Abdoulie Mansally, and Robbie Findley netted a second goal for RSL with the game's final touch.
RSL finishes its two-game trek Wednesday at Portland and then returns to Utah for next Saturday's clash with Columbus. The Galaxy play their CONCACAF Champions League group-stage opener Tuesday at StubHub against Costa Rica's Cartagines and return to league action next Saturday at Vancouver.