HOUSTON -- What Yankees left-hander CC Sabathia longed for were the results to match what he believed were performances superior to what his won-loss record had indicated over the previous five weeks, and on Tuesday night, he finally found a small measure of validation.

Sabathia snapped a six-start winless streak and the New York Yankees claimed their third consecutive series win with a 6-3 victory over the Houston Astros at Minute Maid Park.

Sabathia (6-8) produced his best start since mid-June, allowing just two runs on four hits and two walks with five strikeouts over 6 2/3 innings. He had surrendered at least four runs and seven hits in each of his six starts dating back to a 4-1 win over the Twins on June 16, but against the Astros he came equipped with a viable two-seam fastball.

"I think just getting the results (helps)," Sabathia said. "That was the biggest thing that me and (Yankees pitching coach) Larry (Rothschild) and Mac (catcher Brian McCann) had talked about was not really changing, just keep going out, keep plugging away and it paid off today."

Jacoby Ellsbury finished 3-for-5 while Carlos Beltran, Mark Teixeira and Starlin Castro recorded two hits apiece to pace the Yankees (52-48) offense. The bottom third of the Yankees order produced five RBIs.

The Astros (54-46) fashioned a threat against the Yankees bullpen, with Marwin Gonzalez completing his first career multi-homer game with a solo shot off right-hander Anthony Swarzak in the eighth inning.

Gonzalez belted his ninth and 10th homers, one from each side of the plate to become the first player in club history to accomplish that feat since Lance Berkman did so against the Chicago Cubs on July 3, 2006.

Dellin Betances later relieved Swarzak and walked Evan Gattis and Alex Bregman to load the bases with two outs before striking out Jason Castro on three consecutive pitches to quell the rally. Andrew Miller worked the ninth inning for his ninth save and second in as many nights.

Gattis cranked his 17th homer off Sabathia in the seventh. Astros third baseman Luis Valbuena left in the second with a right hamstring strain.

"After the first three or four steps, I feel something there. I fell down," Valbuena said. "I feel OK. But we're going to see tomorrow how I'm going to feel."

Astros right-hander Doug Fister (10-7) departed with two outs in the fifth inning to match his shortest outing of the season. Teixeira and Castro were particularly effective against Fister, combining to reach base six times and six plate appearances through the fifth.

Shortstop Didi Gregorius' sacrifice fly pulled the Yankees even at 1-1 in the second inning. Chase Headley followed with an RBI single that scored Teixeira and put the Yankees ahead to stay at 2-1.

After Castro upped the lead to 3-1 with his RBI single in the third, he was intentionally walked to load the bases with one out in the fifth. Headley followed with a sacrifice fly before Aaron Hicks chased Fister with a two-run triple that scored Teixeira and Castro for a 6-1 lead.

"I didn't execute today," Fister said. "Basically, I let my team down. It was execution. I left balls over the middle, and it wasn't one of my better nights by any means."

Fister, whose start against the White Sox on July 2 also lasted 4 2/3 innings, departed having allowed six runs on nine hits and three walks.

"I think it was a good night," Teixeira said. "A good night to help the team out and I think we all had a good approach against Fister, a good pitcher. We made him get the ball up, didn't chase a lot of pitches in the zone and that was my approach. Just hit the ball up in the zone."

NOTES: Yankees LHP Chasen Shreve was optioned to Triple-A Scranton/Wilkes-Barre to make room on the roster for RHP Adam Warren, who was acquired Monday as part of a five-player trade with the Cubs. Shreve was 1-1 with a 4.30 ERA in 24 games, with 18 hits, seven walks and 20 strikeouts in 23 innings. Warren will initially work out of the Yankees' bullpen. ... One night after making his major league debut at third base, rookie Alex Bregman served as the designated hitter. Bregman went through the paces in left field during pregame with Astros manager A.J. Hinch announcing that Bregman could start in left on Wednesday night. ... Astros CF Carlos Gomez was eighth in the batting order for a third consecutive start and fourth time this season, a move linked to yet another prolonged slump. Gomez entered Tuesday batting .125 with 14 strikeouts in 52 plate appearances since his last multi-hit game on July 6. His weighted on-base average (.263) would rank third worst if he had enough plate appearances to qualify.