Granderson drove Haren's third pitch into the Mets bullpen in right field for his 28th career leadoff homer and fourth this season - the most by a Mets player since Jose Reyes had four in 2008.
The right-hander allowed only two singles after that.
''I was really mad. Kind of a stupid pitch to Granderson,'' Haren said. ''He's not your typical leadoff hitter, he's got a lot of power, and I kind of laid one in there. I got a couple of outs after that and then really settled in pretty good.''
Haren (11-10) struck out six and walked none over seven innings, helping the Dodgers maintain their 3 1-2 game lead over San Francisco. The victory was his third in four starts after going 0-5 with a 10.03 ERA in his previous five outings.
Jonathon Niese (7-9) allowed five runs - two earned - eight hits, and three walks in 6 2-3 innings. The unearned runs were the result of a throwing error by shortstop Wilmer Flores on a routine grounder by Adrian Gonzalez.
''It's part of the game, A lot of us have had bad days, and we've all been there,'' Niese said. ''I've made a ton of errors that have cost us games. So you can't point the finger at (Flores). If I struck out Gonzalez, then he wouldn't have had to make that play. So it's on my shoulders.''
The Mets tied a season high with four errors, including a dropped foul pop by first baseman Lucas Duda.
''We had a bad night. It happens,'' manager Terry Collins said. ''When you look up (after eight innings) and you have as many errors as you've got hits, that's not a good feeling. We looked a little ragged, but that shouldn't affect us.''
The Dodgers got their first two batters on in the third inning before Haren bunted into a double play started by Niese. But Dee Gordon slapped an opposite-field RBI single inside third to tie it 1-1.
''I think the main thing Dee has done is stay within his approach,'' Dodgers manager Don Mattingly said. ''He's hit numerous balls down the third-base line, and that tells you he's letting the ball get deep. He's doing it against righties and lefties.''
Haren came up again in the fifth with runners at the corners and tried a suicide squeeze. He bunted through an 0-1 pitch, and Justin Turner was erased in a rundown at third, but Haren then singled to drive in Erisbel Arruebarrena and give Los Angeles a 2-1 lead.
''I almost made four outs in two at bats,'' Haren said. ''I haven't done a squeeze in a long time - since probably spring training - and I just got a little antsy with it. But I was lucky
''I put a pretty good at-bat together and got us the lead there, and I felt good about that. I was still frustrated that I left J.T. out there hanging.''
Gordon hit his major league-leading 11th triple with two out in the seventh and scored on Flores' second error of the game. Carlos Torres relieved Niese, and Matt Kemp greeted him with a two-run double to make it 5-1.
Until then, Mets relievers had stranded 132 of 166 inherited runners (79.5 percent), the best in the majors.
''We've done a good job there. But Matt Kemp's a pretty good hitter, so you've got to make pitches,'' Collins said.
Mets: Closer Jenrry Mejia, who was held back from a save situation Wednesday at Oakland because of a sore back, was the first Mets player on the field to do running and was available if needed, Collins said.
Dodgers: There have been no setbacks in the rehab programs for SS Hanley Ramirez (right oblique), 3B Juan Uribe (right hamstring), LHP Hyun-Jin Ryu (right hip), and LHP Paco Rodriguez (back). Ramirez could be activated from the DL on Sunday.
Mets: Rookie Jacob deGrom (6-5, 2.87 ERA) will be reinstated from the disabled list and make his first start since Aug. 7, after being sidelined with rotator cuff tendinitis. He gave up three home runs to the Dodgers in a 4-3 home loss on May 21, but has yielded just one homer in 69 1-3 innings over his last 11 starts. He is 5-0 with a 1.55 ERA in his last six outings.
Dodgers: Zack Greinke (12-8, 2.75 ERA) pitches on seven days' rest after being pushed back two days because of elbow discomfort. He will try to avoid losing three consecutive decisions for the first time since June 8, 2010, with Kansas City, when he dropped four starts in a row.