LaRoche stroked the two-out run-scoring single off Houston reliever Brian Moehler, driving in Jack Wilson in the bottom of the 16th inning to lift the Pirates to victory.
The hit snapped a 0-for-18 batting streak for LaRoche at PNC Park.
"It felt really good," LaRoche explained. "It felt really good. I don't have to tell you guys that I have been in the most unbelievable funk and probably the most frustrating part is feeling as good as I do a lot of those at-bats. For as bad as it's going, the confidence is still there. I've been through slumps before, nothing like this, and I know it eventually turns around.
"I'll tell you the coolest part is probably how much my team is pulling for me -- every one of them. They're almost in this thing with me it feels like. To see them rush the field and show the support they have been showing all year is pretty special. You don't get that a whole lot of places."
It was the fifth consecutive win for the Bucs over the Astros this season. It is the first time the Pirates have defeated the Astros five consecutive times since the 1991 season.
"That was a fantastic game to win," Pirates manager Jim Tracy gushed. "When you look up at the board, and you see the number of opportunities that they had offensively when you look at the left-on-base scenarios. We didn't have too many chances offensively, that's for sure."
Right-hander John Wasdin notched the win with two scoreless innings of relief to even his record at 1-1.
The Pirates got outstanding relief work from John Grabow, Jonah Bayliss, Damaso Marte and Shawn Chacon, who held the Astros at bay for four innings.
"Our bullpen got tested," Tracy said. "And once again ours passes big time."
Duke, a 24-year-old left-hander, was coming off two consecutive subpar outings. He tossed seven innings and surrendered one run on six hits, receiving a no-decision.
Houston starter Matt Albers received a no-decision after pitching six innings and allowing three runs on four hits.
Moehler suffered the loss to fall to 0-1 on the season.
The Astros jumped on Duke for a quick 1-0 lead in the first inning. Chris Burke drew a one-out walk and eventually came around to score on a sacrifice fly by Carlos Lee. Coming into the contest, Duke had allowed nine first-inning runs in his last two starts.
The Pirates broke through against Albers in the bottom of the fourth inning. Wilson beat out an infield single. Jose Bautista doubled down the right-field line, extending his hitting streak to a career high 12 games. Jason Bay got an RBI on a groundout to second, scoring Wilson. LaRoche lofted a sacrifice fly to center field, plating Bautista and staking the Pirates to a 2-1 lead.
Pirates right fielder Brad Eldred snapped a 0-for-17 streak at the plate when he launched his second home run of the season in the bottom of the fifth inning, increasing the Pittsburgh lead to 3-1.
The Astros tied the game in the ninth inning against beleaguered Pirates closer Torres. Pinch-hitter Luke Scott and Craig Biggio delivered RBI singles, tying the game at 3. Lefty John Grabow came on to put down the uprising.
The Pirates have had some marathons recently with Houston, going 18 innings in May 2006 and 15 innings in September 2006.
"Since last year, that's the third time we've been involved with them," Tracy stated. "It's obviously a great game when you win it. It's a very tough game when you get beat when you're out there for close to five hours. That's tough to take."
The Pirates, to a man, called it a character win.
"Absolutely, and you can look back and this team might have lost this game last year," Chacon said. "We might have lost it earlier in the game and might not have went 16 innings. You look at that, and you look at the way we played defense and we pitched ourselves out of jams. Then in the last inning, when we had an opportunity to win the game, we did it. Nobody fell asleep, nobody relaxed, nobody lost focus. That's what happens with good teams, and you can just tell we're getting better."
George Von Benko is a contributor to MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.