The Dodgers went scoreless until the fifth inning, running their scoreless streak to 35 consecutive innings, tying the record for franchise futility since the club moved to Los Angeles in 1958.
But in the fifth inning, Justin Turner opened with a single, followed by a double from Andre Ethier, giving the Dodgers a 1-0 lead and their first run since the fourth inning on Sunday against Colorado.
Zack Greinke made sure the Dodgers didn't need much, keeping the Padres scoreless until the seventh inning, running San Diego's own streak to 20 scoreless innings.
Greinke pitched into the eighth inning, striking out five and allowing just one run on six hits with a walk. His 7⅔ innings matched the longest outing by a Dodgers starting pitcher this season, set by Greinke himself on May 5.
"Zack pretty much dominated that game. He was on the attack, very few pitches early. He was really sharp tonight," manager Don Mattingly said. "I thought he was outstanding."
But with two runners on and 105 pitches on his odometer, Greinke was pulled with two outs in the eighth inning in favor of Chris Hatcher, who got Justin Upton to fly out to right field to end the threat. For Hatcher, it was one out on one pitch, and thanks to Pederson, his first win as a Dodger.
Pederson slammed a ball deep into the right field pavilion off Joaquin Benoit with one out in the eighth for his 11th home run of the season. The home run came on an 0-2 count and Pederson, who has 47 strikeouts in 166 plate appearances this season, was asked if he shortens up his swing in that count.
"I think you've seen my strikeouts," Pederson said, laughing.
The home run was Pederson's second hit on an 0-2 count this season. It was the Dodgers' first home run since Jimmy Rollins in the first inning on May 15, snapping a span of 58 innings without one.
It couldn't have come at a better time for the Dodgers.
Kenley Jansen retired the Padres in order in the ninth inning for his second save. He has retired all 10 batters he has faced this season, including seven by strikeout.
Home run: Joc Pederson (11)
WP - Chris Hatcher (1-3): 1 up, 1 down
LP - Joaquin Benoit (4-2): 1 IP, 1 hit, 1 run, 1 strikeout
Sv - Kenley Jansen (2): 1 IP, 2 strikeouts