"We continually talk about just meeting the demands of the game, and tonight we didn't meet enough of them," Pirates manager Clint Hurdle said.
Because the Cubs defeated the Brewers, the Pirates' deficit in the NL Central remained at 1 1/2 games.
Wednesday night was the first multi-home run game this season off Worley, who entered on a roll. In 5 1/3 innings, Worley tied a season high by giving up nine hits. He also gave up three earned runs for the first time since July 8, when he allowed four in five innings.
"It's a good hitting ballclub," Worley said of Detroit. "It's up to me to command the zone and make it mine."
The Pirates built him a three-run lead in the fourth inning off Detroit starter Buck Farmer, who had made only two starts above the Class A level and none in the Majors. For three innings, Farmer motored along, racking up four strikeouts.
But, as Pittsburgh manager Clint Hurdle predicted before the game, a trip through the batting order can do wonders for a team getting its first looks at a pitcher. The bottom half of the Pirates' order cracked Farmer in the fourth.
"Early on, he was effective," said Travis Snider, who clubbed a two-run shot to right to cap the three-run frame. "Later in the game, he made a couple mistakes. Overall, he gave his team a chance to win, so you've got to tip your cap on that one."
Jordy Mercer's RBI triple was upheld in the previous at-bat after a replay review, setting the table for Snider's 10th blast of the year, which gave Pittsburgh a 4-1 lead.
An inning earlier, Russell Martin had tied the game, 1-1, with his 1,000th career hit, an RBI double off the right-field fence.
But, after the four straight Pirates runs, Detroit countered with a three-run inning of its own in the fifth. The Tigers were aided by a Jayson Nix throwing error, which gave them an extra out that they put to good use.
"I don't second-guess my players," Hurdle said, when asked if he'd prefer to see Nix take the out at first as opposed to throwing to second like he did. "The play was taking him that way, but if he makes a good throw, the guy's out. He's played solid defense for us."
Alex Avila led off the frame with a solo home run. Both Avila and Castellanos' solo homers came off sliders from Worley.
"Some breaking balls were up tonight," Hurdle said. "This is a very good hitting ballclub that we're playing and you've got to make pitches. Throughout the course of the night, we missed some locations and they took advantage of it."
After Nix was unable to record an out on the routine grounder, two unearned runs crossed the plate for Detroit by way of a Miguel Cabrera sacrifice fly and an RBI single by Victor Martinez.
While Tigers manager Brad Ausmus acknowledged the break his team caught on the error, he pointed to Martinez's base hit as the biggest play of the inning -- and maybe the game.
"Really, we got the big hit we've been looking for with Victor Martinez," Ausmus said. "We had a couple things bounce our way. The error by the second baseman to the shortstop on the double play certainly helped. But I think it was the big hit by Victor that opens up the game, opens the gap a little bit."
Martinez also drove in two more on another single in the seventh, when the Tigers broke the game open with another three-run frame, this time off rookie reliever Stolmy Pimentel.
Hurdle said he's been looking to insert Pimentel into tenser game situations when swings and misses are needed. Those were few and far between Wednesday night, though.
The difference, though, came in the sixth when the rookie Castellanos put the Tigers ahead with his homer to left-center -- the third and final lead change of the night.