''You know when you have an ace on the mound, you spot him five runs, it's a real uphill climb,'' San Diego manager Andy Green said. ''Our guys made that climb today. It was really special to come back against a guy like that.''
Fernando Tatis Jr. also hit a two-run homer and Wil Myers had a solo shot for the Padres.
Kevin Pillar hit his first career grand slam in the fourth but Bumgarner and the Giants' relievers couldn't hold a 5-0 lead.
''What makes it more difficult is to feel as good as I did and command to be as sharp as it was and all that and then to get the result we did, that's what makes it hard to swallow,'' Bumgarner said. ''We should (win), regardless of how we're built or not, our pitching's good enough we've got to win those games.''
San Francisco's Gerardo Parra went down in the seventh after being hit in the face by a 93 mph fastball from Brad Wieck that ricocheted off Parra's shoulder. Parra immediately grabbed at the right side of his face and went face down in the dirt near home plate as manager Bruce Bochy and a pair of athletic trainers scurried out. Parra was eventually able to get up to one knee and walk off holding a towel to his face.
Bochy said Parra cut his lip and should be available Tuesday.
Bumgarner didn't allow a hit until Tatis' homer in the fifth. Tatis was twice hit by pitches from Bumgarner, including to start the seventh three batters before the decisive home run.
When Bumgarner struck out Luis Urias to end the third, it gave the lefty 1,607 career Ks to pass Hall of Famer Gaylord Perry for seventh on the franchise list and also fourth on the San Francisco list.
Brandon Crawford put the Giants ahead with an RBI single in the fourth and Pillar connected for his first home run of the year three batters later after Eric Lauer (2-1) intentionally walked Yangervis Solarte.
The grand slam was the first for the Giants in two years, since Brandon Belt connected against San Diego on April 7, 2017.
Bumgarner left to a standing ovation when he gave way to Reyes Moronta (0-2) with two runners on in the seventh. Manuel Margot immediately delivered an RBI groundout, and Reyes' first home run of the year was a drive that landed on the concourse above the left field bleachers.
Lauer struck out eight over six innings with three walks, allowing four hits and five runs. Kirby Yates finished for his sixth save, walking Joe Panik with one out after left fielder Myers dropped a foul ball in the Giants' bullpen.
Manny Machado went 0 for 4 and was booed each time he came to the plate as the NL West rivals met for their second series already after the Padres took three of four to open the season at Petco Park.
Giants newcomer Tyler Austin singled and started at first base with Belt moving to left field after Austin was acquired in a trade from the Minnesota Twins. Belt shifted to first in the sixth as Parra entered in left.
The Giants played their first regular-season game with the new 6:45 p.m. PDT start time, a half-hour earlier than in the past. Friday night games will still begin with first pitch at 7:15 p.m. PDT.
Padres: Placed OF Franchy Cordero and LHP Aaron Loup on the 10-day injured list, each with left elbow strains. Cordero is in San Diego and will undergo further tests on his troublesome elbow. He had bone spurs removed last year. Green said Loup felt discomfort throwing a pitch to Paul Goldschmidt on Sunday in St. Louis. ... San Diego recalled Urias and Wieck from Triple-A El Paso. Urias started at second base and led off to open the three-game series.
Padres: LHP Joey Lucchesi (2-0, 0.00 ERA) has thrown 10 1/3 scoreless innings with 13 strikeouts and three walks to begin the year.
Giants: LHP Derek Holland (0-1, 5.00) took the loss in the second game of the season at San Diego, allowing three runs and four hits over four innings.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports