Pepi, who is 18 years, 197 days of age, increased his season goal total to a team-high eight with his first career hat trick. The El Paso, Texas, native is in his third season with the team.
FC Dallas emphatically snapped a three-match losing streak, all of which came on the road. FCD is a different team at home -- it is now unbeaten in 17 straight home matches (with nine wins and eight draws), the longest active regular-season home unbeaten run in MLS.
Pepi put FC Dallas on the board in the 27th minute when he finished off a pass from Andres Ricaurte that bounced off Galaxy defender Daniel Steres. Pepi's kick from the center of the box was placed in the right corner past Los Angeles goalkeeper Jonathan Bond.
Pepi added his second goal in the 44th minute, making short work of a corner kick from Jesus Ferreira that Pepi headed off the back LA defender Derrick Williams. The rebound landed at Pepi's feet at a severe angle to the goal, but the teen was up to the task.
The third goal came in the 50th minute after FCD midfielder Szabolcs Schon carried the ball deep into the box and fought off two Los Angeles defenders before passing to Pepi in front of the goal. Pepi moved the ball to his right foot and sent a low shot into the left corner of the net to all but end the Galaxy's chances.
Jimmy Maurer made three saves to earn his second shutout of the season and the 13th of his six-year MLS career.
Jader Obrian added FCD's fourth goal in 88th minute to cap the scoring.
The Galaxy are 0-2-1 over their past three matches, their longest stretch of the season without a victory.
It was Los Angeles' fifth consecutive match without injured leading scorer Javier "Chicharito" Hernandez as well as midfielders Jonathan dos Santos and Efrain Alvarez, both of whom are with the Mexican team at the CONCACAF Gold Cup.