The Astros seemed set to break their long skid when they took a 5-4 lead into the ninth but they couldn't hold the advantage.
Rhiner Cruz (1-1) allowed a one-out single to Michael McKenry and then issued consecutive walks to pinch-hitters Sutton and Casey McGehee to load the bases. Xavier Cedeno came in to pitch and surrendered a game-tying sacrifice fly to Starling Marte, which sent Sutton to third.
Then, with Rod Barajas at the plate, Cedeno uncorked a wild pitch, and the Astros remained winless since July 16.
McKenry finished 3-for-4 with a solo homer and Tony Watson (5-1) picked up the win for the second-place Pirates, who remained two games behind the National League Central-leading Cincinnati Reds.
Chris Johnson collected three hits, including a solo homer, while Ben Francisco went deep and added an RBI single for Houston.
Exploding whale video goes viral on Internet
Video of Victoria’s Secret models trying to 'twerk' hits Instagram