Gonzalez connected for a two-run shot in the third. Oscar Salazar also homered for the Padres, who have won 10 of their last 13 series.

Andres Torres hit a two-run homer for the Giants. The NL wild-card contenders have lost three of their last four.

Barry Zito (9-12) gave up three runs on six hits over five innings. He lost his fourth straight decision to the Padres.

LeBlanc allowed two runs on four hits. He retired 11 straight before walking the first two batters of the eighth.

Luke Gregerson, who earned his first major league win Tuesday night, came on to get pinch hitter Kevin Frandsen to pop up a bunt attempt, struck out pinch hitter Eugenio Velez and retired Freddy Sanchez on a popup.

Heath Bell pitched the ninth for his 37th save in 40 chances, matching St. Louis closer Ryan Franklin for the NL lead.

The Padres took a 1-0 lead in the first when Everth Cabrera beat out an infield single, stole second, went to third on a passed ball and scored on a single by Gonzalez.

Torres' third home run in the third brought the Giants within 3-2 but they never seriously threatened again until the eighth.

NOTES: Giants LHP Randy Johnson (strained left shoulder) threw 30 pitches off a mound near his home in Arizona on Tuesday, the second time he's thrown off a mound since the injury on July 6. ... Giants OF Eugenio Velez bruised a finger sliding into second base on Tuesday night was out of the starting lineup. ... LeBlanc made his fourth consecutive road start. ... Salazar batted fifth for the first time.

(AP Photo/John Raoux). New York Yankees pitcher Masahiro Tanaka throws in the first inning of a spring baseball exhibition game against the Detroit Tigers, Saturday, March 17, 2018, in Lakeland, Fla.

Major League Baseball is working to finalize a two-game series between the New York Yankees and Boston Red Sox at London's Olympic Stadium on June 29-30 in 2019, a person familiar with the plans tells The...

Major League Baseball is working to finalize a two-game series between the New York Yankees and Boston Red Sox at London's Olympic Stadium on June 29-30 in 2019, a person familiar with the plans tells The Associated Press.

(AP Photo/Mark Humphrey). Nevada guard Hallice Cooke (13) and forward Elijah Foster (12) celebrate at the end end of the second half of a second-round game against Cincinnati, in the NCAA college basketball tournament in Nashville, Tenn., Sunday, March...

The Sweet 16 field is set after a roller coaster ride of an opening weekend in the NCAA Tournament.

The Sweet 16 field is set after a roller coaster ride of an opening weekend in the NCAA Tournament.

(AP Photo/Nam Y. Huh). Cleveland Cavaliers head coach Tyronn Lue reacts as he watches his team during the first half of an NBA basketball game against the Chicago Bulls, Saturday, March 17, 2018, in Chicago.

Cavaliers coach Tyronn Lue is taking a leave of absence from the team to address health issues that have included chest pains and loss of sleep.

Cavaliers coach Tyronn Lue is taking a leave of absence from the team to address health issues that have included chest pains and loss of sleep.

(AP Photo/Alan Diaz/File). FILE - This is a Saturday, April 4, 2015, file photo of former tennis star Martina Navratilova, right, as she poses with Serena Williams, after Williams won the women's final match at the Miami Open tennis tournament, in Key...

Martina Navratilova says she is "angry" and feels let down by the BBC after learning that John McEnroe gets paid at least 10 times more than her for their broadcasting roles at Wimbledon.

Martina Navratilova says she is "angry" and feels let down by the BBC after learning that John McEnroe gets paid at least 10 times more than her for their broadcasting roles at Wimbledon.

Organizers of the North American bid to host the 2026 World Cup insist FIFA members have not expressed concern about President Donald Trump's harsh words about foreigners or the U.S. Justice Department prosecuting...

Organizers of the North American bid to host the 2026 World Cup insist FIFA members have not expressed concern about President Donald Trump's harsh words about foreigners or the U.S. Justice Department prosecuting corrupt soccer officials.

(AP Photo/Gerry Broome). UMBC's Jourdan Grant (5) celebrates after a basket against Kansas State during the second half of a second-round game in the NCAA men's college basketball tournament in Charlotte, N.C., Sunday, March 18, 2018.

(AP Photo/Gerry Broome). UMBC's Arkel Lamar, Jourdan Grant and K.J. Maura, from right, embrace as they leave the court in the closing moments of the team's 50-43 loss to Kansas State in a second-round game in the NCAA men's college basketball tournamen...

UMBC captured the hearts of the college basketball world with its Goliath-slaying victory over top-seeded Virginia in the opening round of the NCAA Tournament.

UMBC captured the hearts of the college basketball world with its Goliath-slaying victory over top-seeded Virginia in the opening round of the NCAA Tournament.

(AP Photo/Phelan M. Ebenhack). Rory McIlroy, of Northern Ireland, reacts to his shot after hitting from the third fairway during the final round of the Arnold Palmer Invitational golf tournament Sunday, March 18, 2018, in Orlando, Fla.

The last roars at Bay Hill are for Rory McIlroy, who charges to victory at Arnold Palmer Invitational.

The last roars at Bay Hill are for Rory McIlroy, who charges to victory at Arnold Palmer Invitational.