The Astros scored twice in the sixth to chase Arrieta and got back-to-back homers from Yulieski Gurriel and Evan Gattis to start the ninth to cut the lead to 9-5.
The Cubs, whose magic number is now five, pushed their National League Central lead to 16 games over the Cardinals, while the Astros' fourth loss in five games dropped them 3 1/2 games behind the Orioles and Blue Jays in the American League Wild Card race.
Brian McTaggart has covered the Astros since 2004, and for MLB.com since 2009.