LaMonte Wade Jr. doubled, tripled and drove in two runs as the Giants won in manager Gabe Kapler's first home game against his former team. Kapler was fired in 2019 after two seasons as the Phillies' manager.
San Francisco has won five straight, 17 of 23 and is a majors-best 45-25.
"I feel that we're more united, that we're getting along better, and that we're enjoying ourselves," Cueto said through an interpreter. "We're winning. I just hope that we continue winning so we can have more happy days."
Andrew McCutchen hit his 12th home run for the Phillies. Odúbel Herrera connected for his fifth, a solo shot leading off the game. Bryce Harper had two hits in his return to Philadelphia's lineup after leaving Wednesday's game against the Dodgers with lower back tightness.
Cueto (5-3) settled down to beat the Phillies for the second time in 13 career starts after giving up Hererra's home run on the fourth pitch of the game. Cueto allowed three runs on six hits.
"He made several quality pitches that they put good swings on," Kapler said. "He was able to go six innings in large part because his defense played good behind him. He pitched to contact and he doesn't walk guys."
An All-Star for the Giants in 2016, Cueto also walked and scored the tie-breaking run on Wade's triple in the fourth.
"When I saw the ball come off the bat I told myself I have to score from first," Cueto said. "I felt stronger after running the bases. I work hard at it."
Dominic Leone and Tyler Rogers retired three batters apiece. Jake McGee pitched the ninth for his 14th save.
Phillies starter Vince Velasquez (2-2) allowed four runs, three earned, and walked four in four innings. Velasquez is winless over his last four starts.
Having four walks under my belt is unnecessary," Velasquez said. "I have to do a better job attacking the zone. It seemed like I was all over the place."
SORRY ABOUT THAT
The Phillies threw the ball around like a Little League team in the second inning, but it was a defensive breakdown in the first that stood out. San Francisco's Buster Posey hit a high foul ball down the right field line that first baseman Rhys Hoskins and second baseman Brad Miller tried to chase down. Hoskins was in position to make the catch when Miller stumbled and bumped into him from behind, just before the ball landed on the ground. No error was charged, although Posey drew a walk.
"You can't make the little mistakes, they're going to haunt you," said Harper of the Phillies defense. "We can't give them outs. You get 27 of them and we're giving them a couple more. We need be better tomorrow and make less mistakes."
Phillies: Catcher Andrew Knapp was placed in concussion protocol after coming out of the game when he took a hard foul ball off the facemask in the sixth. Knapp dropped to the ground and stayed on his knees for several moments as manager Joe Girardi and a team trainer came out. Knapp finished the inning before being replaced by J.T. Realmuto.
Giants: INF Darin Ruf (strained right hamstring) ran the bases before the game and may begin a rehab assignment this weekend. 2B Tommy La Stella (strained left hamstring) also ran the bases and is close to beginning a rehab assignment. ... Kapler said the Giants are unsure whether to activate OF Alex Dickerson (upper back tightness) off the IL to rejoin the team or send him on a rehab assignment. ... RHP Aaron Sanchez was pulled from a rehab start with Triple-A Sacramento due to a blister on his right middle finger.
Giants LHP Alex Wood (6-3, 3.71 ERA) faces Philadelphia on Saturday and will try to end a rough patch. Wood has allowed 13 earned runs in 15 innings over his previous three starts. Phillies RHP Aaron Nola (5-4, 3.69) has one win in four career starts against San Francisco.
Belt puts one into the arcade in right for a HR
Brandon Belt lines a home run into the right-field seats for his 10th on the season.