Castro had three hits, including a game-ending single in the 10th inning, and Chicago rallied past the Milwaukee Brewers 5-4 on Tuesday night.
The winning run capped a late comeback as Jeff Samardzija (5-2), the last of six Cubs pitchers, won his second straight game in relief.
"We made some mistakes early and didn't do ourselves any favors," said Chicago manager Mike Quade, whose team committed three errors. "There were about a half-dozen plays and things I saw that I'm not very happy about and they damn near cost us. But they kept playing."
"It was a great at-bat by (Castro) against a tough right-hander," Quade said. "He's done exactly what I needed him to do this year.
Campana opened the 10th with a double off Dillard and moved to third on Kosuke Fukudome's sacrifice, bringing up Castro.
"Campy's got great speed, but he's got to get on base to use it," said Quade, who was ejected after loudly complaining about a pitch to Prince Fielder that plate umpire Alfonso Marquez called a ball.
Trailing 4-1, the Cubs scored three times in the eighth off Milwaukee reliever Marco Estrada. Castro doubled home Fukudome, and Aramis Ramirez followed with his fifth homer, a two-run shot that tied it 4-all.
"I don't know what's going on with (Estrada)," Brewers manager Ron Roenicke said. "Last time he pitched he had a good outing. This time, his stuff looked fine. It's down in the zone, changeup looks good, but for some reason they're hitting him well."
The rally spoiled a strong effort by Milwaukee ace Yovani Gallardo, who allowed three hits and struck out a season-high 10 in seven innings.
"I was able to mix my pitches a little better than my last start," Gallardo said. "You've just got to take that as a good thing and keep moving forward."
The Brewers, who lost the first game of the series 1-0 on Monday, dropped back-to-back games for the first time since a seven-game losing streak from April 30 to May 6.
"Today's was tough," Roenicke said. "Yesterday we didn't swing the bat, but today was a tough loss."
Milwaukee maintained a share of the NL Central lead as St. Louis lost 8-6 at Washington.
The Brewers scored twice in the third inning, sending eight batters to the plate while leaving three on base.
Rickie Weeks led off with a single and scored the first run on Ryan Braun's base hit. The Brewers then loaded the bases and scored again when Casey McGehee grounded to shortstop for a fielder's choice that brought home Nyjer Morgan.
Fielder's one-out sacrifice fly in the fourth brought home Gallardo for a 3-0 lead.
Geovany Soto's seventh-inning solo home run broke up the shutout bid.
Quade used five relievers over the final three innings, including rookie Chris Carpenter, who made his major league debut in the eighth.
Weeks, who had three hits, greeted Carpenter with a double to left that scored Lucroy for a 4-1 lead.
Wells worked six innings, giving up eight hits and two earned runs. He struck out two and walked three.
"We had a lot of chances to bust that game open all game," Roenicke said. "I know it came down to the bullpen, but that game we should have blown open early."
The Cubs activated outfielder Reed Johnson from the disabled list before the game and sent OF Tyler Colvin to Triple-A Iowa. Johnson was placed on the disabled list May 29, retroactive to May 26, with lower back spasms. Colvin was batting .105 with two homers and eight RBIs. ... The Brewers are 25-9 at Miller Park, but 13-21 on the road. ... The Cubs are 9-9 in one-run games. ... Braun leads NL All-Star vote getters. He had received 2.23 million votes in figures released this week. He is seeking his fourth consecutive All-Star start.
Colorado Rockies' Charlie Blackmon to have surgery for torn meniscus
Rockies outfielder Charlie Blackmon, who has been playing with a torn meniscus in his left knee, has been placed on the injured list and will have surgery on Monday.
Freddie Freeman delivers Los Angeles Dodgers franchise-record 107th win
Freddie Freeman singled in Mookie Betts with one out in the 10th inning and the Dodgers beat the Padres 1-0 on Wednesday night to set the franchise single-season record with their 107th win.
Rockies aim to break 4-game slide, take on the Giants
Colorado Rockies (65-89, fifth in the NL West) vs. San Francisco Giants (76-78, third in the NL West)
Royals bring road slide into matchup with the Tigers
Kansas City Royals (63-91, fourth in the AL Central) vs. Detroit Tigers (61-92, fifth in the AL Central)
Guardians and Rays meet in series rubber match
Tampa Bay Rays (85-70, third in the AL East) vs. Cleveland Guardians (87-68, first in the AL Central)
Brewers host the Marlins to start 4-game series
Miami Marlins (64-91, fourth in the NL East) vs. Milwaukee Brewers (83-72, second in the NL Central)