Trailing 3-2 entering their final at-bat, the Astros struck for two runs to break a five-game skid.
That brought up Bogusevic, who sent a grounder up the middle for the game-winning hit.
Wilton Lopez (4-1) earned the victory with a scoreless top of the ninth after Houston starter Bud Norris had held Milwaukee to two earned runs over seven innings.
Ryan Braun went 2-for-4 with an RBI for the Brewers, who lost their 10th straight road game -- the club's longest such streak since 1992.
'How to Train Your Dragon 2' releases 5-minute clip
Yosemite climber falls 30 feet, suffers major injuries