The Dodgers are now 89-70, which is the same as the New York Mets, their opponent in the first round of the playoffs.
The Mets hold a tiebreaker over the Dodgers by virtue of their head-to-head record and would have home-field advantage in their best-of-five National League division series if they finish the regular season with the same record.
The Dodgers finish the regular season with a three-game series against the San Diego Padres that starts Friday.
"Obviously, you hope to get that home-field advantage," catcher Yasmani Grandal said. "You don't want to go to New York more than once. Hopefully, we can sweep the Padres and give ourselves a chance to get that home-field advantage."
If the win improved the Dodgers' chances of opening the postseason at home, it also provided a necessary lift in confidence for Brett Anderson, who is expected to be the team's No. 3 starter in the playoffs behind Clayton Kershaw and Zack Greinke.
Anderson limited the Giants to four hits and two runs over 7 2/3 innings. The two runs he allowed weren't scored until the eighth inning.
"Hopefully, it carries over into the postseason," Anderson said.
Anderson (10-9), who has spent significant parts of his career on the disabled list, established new career-highs of 31 starts and 180 1/3 innings. He finished the regular season with an earned-run average of 3.69.
Anderson earned $750,000 in bonus pay Thursday — $350,00 for pitching his 175th inning and $400,000 for his 180th.
He made a total of $2.4 million in incentives this season in addition to his base salary of $10 million.
Third baseman Justin Turner missed his second consecutive game with a bruised forearm. Turner was struck by a pitch Tuesday night by Giants reliever Cody Hall.
"It swelled up on him," Dodgers Manager Don Mattingly said.
Greinke was voted by the team's uniformed personnel as the winner of the Roy Campanella Award, which is given to the player who "best exemplifies the spirit and leadership" of the late Hall of Fame catcher. … Right-hander Zach Lee was named the Dodgers minor league pitcher of the year for the second time in three years. A former first-round pick, Lee was 13-6 with a 2.63 ERA in 21 minor league starts, most of them for triple-A Oklahoma City. He made his major league debut in July, when he allowed seven runs and 4 2/3 innings in a loss to the New York Mets. … Alex Verdugo, a 19-year-old Class-A outfielder, was named the organization's minor league player of the year. Verdugo batted .311 in 124 minor league games. He finished the season with High-A Rancho Cucamonga.
Left-hander Alex Wood (11-12, 3.89 ERA) will face right-hander Casey Kelly (0-1, 9.00) and the San Diego Padres on Friday at 7 p.m. at Dodger Stadium. TV: SportsNet LA; Radio: 570, 1020.