Castro's seventh inning blast snapped a tie to give the Astros a 7-4 lead and Jake Elmore ended the scoring in the eighth with his first career homer for the team, a two-run shot.
Travis Blackley (1-0) pitched 1-1/3 hitless innings to secure the win for Houston, who ended a run of six straight losses to the Rangers.
Texas starter Yu Darvish (8-4), who had got the win against the Astros in each of his three previous starts against them, allowed five runs and six hits in six innings as his team slipped to 50-37 for the season.
The 26-year-old Japanese pitcher, who earlier had been named to his second All Star team in only his second season, failed to win for the eighth time in nine starts.
In New York, the Yankees beat the Baltimore Orioles 5-4 after Eduardo Nunez, back in action for the first time in two months after being sidelined by a strained rib cage muscle, drove in the game-winning run.
Nunez, who had started the season as the regular shortstop in place of the injured Derek Jeter, had two hits, a sacrifice fly and two runs batted in to help his team complete a season-high sixth consecutive victory.
Veteran left-hander Andy Pettitte (6-6) struggled early on before halting a three-game skid by allowing three earned runs on nine hits and striking out four in 6-2/3 innings for New York, who improved to 48-39.
Chris Davis hit a major league-leading 33rd homer in the first inning for the Orioles, but starter Chris Tillman (10-3) was unable to protect a three-run lead and had his seven-game winning streak snapped after allowing five runs on 10 hits.
Baltimore slipped to third in the American East with a 48-40 record as division rivals New York jumped ahead of them, 5.5 games behind the pace-setting Boston Red Sox.
In Cleveland, Torii Hunter drove in three runs and Miguel Cabrera blasted a two-run homer to propel the AL Central-leading Detroit Tigers (48-38) to a 9-4 victory.
While Hunter fell a single shy of hitting for the cycle, Anibal Sanchez (7-5) allowed just one run on three hits over five innings on his return from a shoulder strain as the Tigers won their fifth straight, and seventh in a row over the Indians.
In Cincinnati, Mat Latos (8-2) struck out 11 while allowing four runs and six hits in six innings, and also slammed a two-run double, to help the Reds pound the Seattle Mariners 13-4 at Great American Ball Park.
Cesar Izturis drove in three runs, matching his season total, and Jay Bruce scored four times with three RBIs as Cincinnati improved to 50-37.
- Sports & Recreation
- Baltimore Orioles