The win snapped a three-game losing streak for the Padres, who were swept in Los Angeles over the weekend.
Kennedy rebounded from a rough outing his last time out to hold the Giants in check, allowing one run on five hits while walking two and striking out seven in his sixth start since coming to San Diego in a trade with Arizona.
"He got some fastballs in good spots," Padres manager Bud Black said. "I think that's sort of the key. The fastball around the zone is probably what he had going today. His changeup and curveball came into play, but not as much as I've seen in other games. When he needed to throw a strike, he did, and when he needed to get an out, he did. They may have been hard-hit, but that's baseball."
Kennedy echoed Black's sentiment about fastball command being paramount to his success.
"When I wanted it to go up, it was up, and when it was time to go down, it was down," Kennedy said. "I think it was only in that one inning where it kind of got away from me a little bit, but I felt like for the most part, I could throw my fastball where I needed to and kind of work off that. That's how you throw successful games."
"He was throwing a lot of strikes," said Giants outfielder Gregor Blanco. "He was locating all his pitches. He was elevating a couple times in big situations and he did a great job of throwing a lot of strikes."
After improving to 3-1 in his six starts with the Padres, Kennedy indicated that while the transition has been smooth, he might be settling in with his new club.
"The coaching staff, players and everyone have made it really comfortable for me," Kennedy said. "It was maybe a change of scenery; we've said that before, but it has made it a really easy transition coming over here. We have a good group over here. It's been fun."
Nick Vincent contributed a scoreless seventh in relief of Kennedy, and Luke Gregerson kept the Giants off the board after inheriting a leadoff runner in the eighth. Huston Street retired the side in the ninth to convert his 26th save in 27 opportunities.
Hundley tacked on to the Padres' 3-0 lead in the fourth with a solo shot into the bullpen beyond the center-field fence against San Francisco starter Barry Zito (4-11). The homer was Hundley's 11th of the year as he continues to add to his career high.
"I think he was trying to throw a little cutter in, but I don't think he got it where he wanted to," Hundley said. "You don't want to miss those types of mistakes because they don't make them very often."
The 11 home runs by Hundley are the most by a Padres catcher since Ramon Hernandez hit 12 in 2005.
"Nick has got damage in his bat," Black said. "He's got some pull power, he takes a rip at it. He's a dangerous bat, no doubt about it. In good counts or certain pitches, he can put a charge into it."
San Diego built the early advantage in the second when Zito walked three batters and allowed a pair of two-out, run-scoring singles by Ronny Cedeno and Chris Denorfia. Black singled out Denorfia's hit as critical given the results over the weekend against the Dodgers.
"That was big," Black said. "There's the time to get the big hit that has been eluding us lately, the real big hit to stretch a lead or take a lead. That's a little bit of what happened to us up at Dodger Stadium: We couldn't get that big hit."
Zito exited after four innings, allowing four runs on four hits. He struck out three and walked three.