Cueto (6-1) was masterful as he notched his second nine-inning victory over the Padres this season. He allowed one run, four hits and two walks while striking out eight as the Giants' pitching proved too tough for the Padres for the second consecutive night.
Madison Bumgarner earned a complete-game victory with 11 strikeouts on Tuesday.
The first-place Giants won a season-high seventh consecutive game and improved to 9-3 in their past 12. The win also keeps San Francisco a perfect 6-0 on its road trip.
The Padres have lost to the Giants in 13 of the past 16 meetings.
Cueto has started seven times against the Padres and lost only once. He was touched for a run in the second, and after that he blanked the Padres, losers of four of their past five.
Following Alexei Ramirez's second-inning RBI single, Cueto retired 15 of the next 16 batters as the Padres didn't have a runner in scoring position the rest of the game.
Drew Pomeranz (4-4) worked an efficient six innings, surrendering two runs on four hits and two walks, but he failed to earn a third straight win. He struck out five, but he was done in by Pence's big blow in the fourth.
San Diego brought the tying run to the plate in the eighth after pinch hitter Christian Bethancourt's two-out single. Cueto reached back and blew a full count, 95 mph fastball past Wil Myers to end the inning.
Denard Span had two of the Giants' four hits.
Pence powered the Giants to a 2-1 advantage with his two-run homer in the fourth, his seventh of the season and the 201st of his career. Pence's blast to right field, which came off an 0-2 pitch, chased in Buster Posey after Posey coaxed a walk from Pomeranz.
The Padres grabbed a 1-0 lead in the second when Ramirez, who was hitless the night before, drove in Brett Wallace with a crisp single up the middle. Wallace reached on his second double in two games to start the inning, his second extra-base hit of the series.
NOTES: Padres INF/OF Alexi Amarista (hamstring) was reinstated from the disabled list after being idle since April 20. ... San Diego CF Jon Jay (shoulder) is going to avoid the DL. He came off the bench and went 0-for-1. ... The Padres optioned RHP Tayron Guerrero to Triple-A El Paso. ... Giants manager Bruce Bochy flipped RF Hunter Pence and 1B Brandon Belt in the lineup, with Pence moving up to the fifth spot against LHP Drew Pomeranz. ... San Francisco's game in St. Louis on June 5 was moved from the afternoon and will be featured on ESPN's "Sunday Night Baseball."