The 36-year-old Swedish star tied it at 3 in the 67th minute on a diving header off Ola Kamara's feed, then put the Galaxy in front in the 71st with a short hard kick after he headed down a rebound. He celebrated by ripping off his jersey.
Ibrahimovic has 15 goals this season, his first with LA.
The Galaxy (10-7-5) are unbeaten in nine games. Orlando City (7-14-1) has lost 12 of its last 13 games.
Ibrahimovic pulled LA even at 2 in the 47th with a leaping header off Giovani dos Santos's feed.
After dos Santos rang a shot off the crossbar in the 50th, Dominic Dwyer put Orlando back in front in the 54th with a header off Mohamed El-Munir's cross from the end line.
Orlando City took a 2-1 lead just before halftime on LA defender Michael Ciani's own goal. Ciani accidentally deflected Sacha Kljestan's center pass past goalkeeper David Bingham.
Cristian Higuita opened the scoring for Orlando in the 18th minute, connecting from close range. Dos Santos tied it in the 39th, firing a shot to the lower left side off an assist from Ibrahimovic.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.