Updated

Chicago, IL (SportsNetwork.com) - Chris Coghlan smacked a pair of homers, including a go-ahead, two-run shot in the bottom of the eighth inning, and the Chicago Cubs rallied for an 8-7 victory over the Los Angeles Dodgers in the third test of a four-game set.

The Cubs trailed 7-2 heading in the home seventh before plating four in that frame and two more in the eighth to surge ahead.

John Baker led off the eighth with a single against Brian Wilson (2-4) before being forced out at second on Matt Szczur's sacrifice bunt attempt. Coghlan then laced his two-run blast into the front row of seats in right to make it 8-7.

Justin Grimm (5-2) tossed a scoreless eighth to pick up the win, while Hector Rondon fired a 1-2-3 ninth for his 26th save of the year.

Coghlan finished 4-for-4 with three RBI and three runs scored, Arismendy Alcantara cracked a three-run homer and Anthony Rizzo posted two hits, an RBI and a run scored for Chicago, which dropped the first two games of the series.

Adrian Gonzalez belted two homers, a three-run and two-run shot, for the Dodgers, who had won five of their last seven games coming in.

LA is three games ahead of San Francisco for first place in the NL West.

Scott Van Slyke's sacrifice fly in the seventh staked LA to its 7-2 margin before the Cubs' bats got going in the home half.

Coghlan worked a leadoff walk, advanced to second on Javier Baez's groundout and scampered to third on a wild pitch. Coghlan then came home on Rizzo's single to right. Mike Olt singled and Alcantara ripped his three-run blast over the wall in left to trim the gap to 7-6.

The Dodgers raced out to a 6-1 lead by the third inning, starting with a pair of runs in the first.

Yasiel Puig rolled a one-out bunt single and Gonzalez followed by launching his two-run shot into the seats in right.

Chicago got a run back in the home half on Coghlan's solo blast, but LA pushed across four more runs in the third.

Dee Gordon led off the third with a single and stole second before Puig walked. Gonzalez then launched his three-run shot the opposite way over the wall in left-center.

Matt Kemp singled, Hanley Ramirez walked and Justin Turner grounded into a force out to put runners on the corners. Van Slyke's double scored Kemp and gave LA its five-run cushion.

Logan Watkins' RBI double in the fourth cut the hosts' deficit to 6-2.

Game Notes

It was Coghlan's third career multi-homer game ... The Dodgers are 0-56 this season when trailing after eight innings ... Cubs starter Felix Doubront allowed six runs on six hits and three walks over 2 1/3 innings, while Dodgers starter Roberto Hernandez surrendered two runs on six hits and two walks over four frames.