Webb (11-5) allowed five hits and walked two in his second straight win. He pitched seven effective innings in a 6-4 victory at Oakland last weekend.
“His changeup was very good,” Pirates manager Derek Shelton said. “He was able to execute it throughout the count, at any point.”
LaMonte Wade Jr. hit a solo homer, helping San Francisco to its fifth win in seven games. Wade also doubled and scored on Joc Pederson’s double in the first.
Wade is hitting .187 (14 for 75) in 30 games since leaving the injured list, but 5 for 13 (.385) in his last six games.
“My at-bats have been better,” he said. “I’m trying to keep working on it, one at-bat at a time. I think it’s definitely going in my direction.”
Castro had two hits in Pittsburgh’s fifth loss in six games. Tyler Beede (1-2), who broke into the majors with San Francisco in 2018, allowed two runs and three hits in three innings while serving as the opener for the Pirates.
Webb improved to 8-3 in 13 starts this year at Oracle Park. The Pirates loaded the bases in the eighth on Tucupita Marcano’s double and walks to pinch-hitter Josh VanMeter and Bryan Reynolds, but Webb escaped the jam by striking out Ben Gamel.
Webb appreciated being left in the game by manager Gabe Kapler.
“After I walked Reynolds, Kap was like, ‘OK, let’s go,’” Webb said.
Webb also helped himself with a nice defensive play in the third, scooping up Kevin Newman’s soft grounder and lunging for first base for the out.
Wade led off the third with a drive to right-center for his sixth homer. It was Wade’s fourth multihit game of the season.
Pirates: 3B Ke’Bryan Hayes was out of the lineup because of back spasms. Castro replaced him. Shelton reiterated that Hayes, 25, might receive occasional breaks to keep him playable overall. “We’ll try to get him as much relief as possible,” Shelton said. “Hopefully we can alleviate the discomfort.” ... CF Reynolds is continuing to play regularly despite an oblique injury. The switch hitter started Saturday, one day after his streak of reaching base in 10 consecutive games ended.
Giants: Kapler said C Joey Bart, who is dealing with a sprained right ankle, could play if needed in an emergency. Bart is day to day. He ran on the field during batting practice Saturday.
The Pirates and Giants conclude their season series on Sunday at Oracle Park. Zach Thompson (3-9, 5.08 ERA) starts for Pittsburgh, and Alex Wood (8-9, 4.17 ERA) pitches for San Francisco. Wood is 3-4 with a 4.42 ERA in 10 starts at home, compared to 5-5 with a 3.94 ERA in 12 road outings.
Yankees-Dodgers: An Uncivil War trailer
Relive the most iconic moments from the Yankees-Dodgers back-to-back World Series matchups in 1977 and '78, airing on ESPN on Sept. 27.
Fantasy baseball forecaster: Team hitting ratings
Stay ahead of the game and optimize your fantasy baseball hitters with our forecaster, which provides a rolling 10-day outlook of every team's hitting matchups as well as the potential for stolen bases.
Fantasy baseball forecaster: Pitcher projections for the next 10 days
Keep up to date on who is pitching -- and how well they're expected to do -- with our forecaster, which provides a rolling 10-day outlook of every team's probable starting pitchers with game score projections.
Fantasy Baseball Forecaster for Week 24: Sept. 26 to Oct. 5
Set your lineups for the week ahead in fantasy baseball with our forecaster preview, which features pitcher rankings, two-start pitchers, hitter ratings, schedule observations and more.
The biggest storylines down the stretch of the MLB season
Nicole Briscoe and Xavier Scruggs discuss Aaron Judge's quest for the AL home run record and Triple Crown.
What we're watching in the final two weeks of the MLB season
Our MLB experts pick out the one race, game, individual performance and more that they are tuning in to see during the rest of the regular season.