This team's problem is much more of a pitching problem than a hitting problem.
One thing masking this is the fact that run-scoring across the league is down by a significant amount this year, about 10 percent. (Collectively, the league's 15 clubs are on pace to score about 1,000 fewer runs this season than last.) This makes the offensive drop-off this year look worse than it is, and it makes the pitching drop-off this year look less bad than it is.
Other things masking this are the poor hitting with runners on base and in scoring position, the high strikeout rate and the black holes at four places in the batting order. But the strikeout rate was bad last year, there were black holes then too and even the hitting with runners on base and in scoring position was mediocre in 2015, although not as bad as this season thus far.
In 2015, the Astros were fifth in the league with 4.50 runs scored per game. The league average was 4.39 runs scored per game. In 2016, the Astros are ninth in the league with 3.68 runs scored per game. The league average is 3.98 runs scored per game. If the Astros were scoring runs at roughly the same rate as last year, they'd probably be about 10 runs better than they are now. Instead of 8-17, they might be about a game better, 9-16 or 10-15.
In 2015, the Astros were first in the league with 3.81 runs allowed per game. The league average was 4.29 runs allowed per game. In 2016, the Astros are 15th in the league with 4.96 runs allowed per game. The league average is 3.99 runs allowed per game. If the Astros were allowing runs at roughly the same rate as last year, they'd probably be about 35 runs allowed better than they are now. Instead of 8-17, they might be significantly better, probably 12-13 or even just above .500 at 13-12.
This is not to understate the degree of the offensive woes. Since improving your offense and upgrading your pitching are not mutually exclusive, eliminating or reducing the black holes in the line-up and hitting better with runners on and in scoring position would certainly help win more games. But the pitching implosion, both in the rotation and the bullpen, is the primary issue dragging this team down. Until that gets fixed, the Astros are going nowhere even if Gomez, Valbuena and Gattis turn themselves around or help comes from the farm system.