Benji Kikanovic also scored for San Jose (8-9-9, 33 points), which moved just outside of playoff positioning in Major League Soccer's Western Conference and is tied with LAFC (9-11-6, 33 points).
Lopez scored in the 47th minute, his left-footed shot off a centered pass from Marcos Lopez finding the net for his 11th goal of the season and sixth in the past three games.
Seconds later, the Earthquakes got a scare when defender Nathan Cardoso went down trying to stop an LAFC breakaway, appearing to injure a shoulder. He was down for a time, but was able to recover and stay in the game.
With LAFC down by two goals and being outplayed, head coach Bob Bradley went with four substitutions at the same time in the 59th minute, a clear message to his team. One of those subs, Raheem Edwards, had a good chance for a goal in the 69th minute, but his try hit the cross bar and bounced away.
Kikanovic scored in the third minute. On the receiving end of a pass from Javier Lopez, Kikanovic was able to shed a defender and break into the clear. LAFC goalie Tomas Romero was too far out of the goal to recover in time, and Kikanovic scored easily.
LAFC's best scoring chance was a Cristian Arango free kick in the 33rd minute, but it sailed over the goal.
Arango had a header on frame in the 78th minute, but it was saved. LAFC has lost two straight.
San Jose won its second consecutive match and has seven points in its last four (2-1-1) to get into postseason contention.
--Field Level Media
Javier López puts San Jose up 2-0 vs. LAFC
Javier López goal 47th minute San Jose Earthquakes 2-0 LAFC