Goodbye to the Astros’ six-game losing streak. Hello to more trouble for the under-performing Angels.

Down three runs after the top of the first inning, the struggling Astros finally turned themselves around Tuesday, rallying for a 7-6 win at Minute Maid Park before an announced crowd of 15,266.

It was the Astros’ first comeback victory of the season. And while the club still has the worst record in baseball, it improved to 2-2 against an Angels (11-21) team that has a payroll worth nearly seven times as high.

“I’m extremely proud of the guys in that room,” Astros manager Bo Porter said.

Moved into the No. 3 hole for the first time this season, Astros second baseman Jose Altuve responded with a 2-for-3 outing with two RBIs and two runs.

The Angels’ superstar trio of Mike Trout, Albert Pujols and Josh Hamilton were held to a combined 1-of-11. Hamilton went hitless in four at-bats and struck out twice, lowering his average to .202.

Mark Trumbo’s three-run home run to left field gave the Angels a 3-0 first-inning lead against Astros righthander Jordan Lyles, who made his second start after being called up from Class AAA Oklahoma City.

Lyles (five innings, three runs, six strikeouts, win) settled in once the second frame began. And for the first time in eight days, the Astros’ offense backed up their starting pitcher. Altuve’s solo homer and infield RBI single and Jimmy Paredes’ RBI double tied the game at 3. Chris Carter then lined Angels starter C.J. Wilson’s 1-1 fastball into the Crawford Boxes, making it 6-3 Astros in the third inning.

“I told (Lyles) when I went to take him out of the game, I said, ‘There’s going to come a time where I will ride you a whole lot longer. … Right now is not that time. But you’ve done your part and you’re going to turn it over to the bullpen.’ ” Porter said.

Closer Jose Veras, who blew a save Friday during a loss to Detroit, shut down the Angels in the ninth.

“I just attacked and went after them,” Veras said.