Gattis got the Astros on the board with his seventh homer in the third inning, but the big blow was Carter's sixth homer, an opposite-field poke into the Astros' bullpen in right-center field that put the Astros ahead, 5-3.
A high strikeout-guy, Carter has a place in the lineup, according to Houston manager A.J. Hinch.
"The guy can make a difference in the game," Hinch said. "I put him in the lineup because he helps us."
Two batters after Carter homered, Gonzalez went deep with a solo shot to right field that turned out to be the decisive run.
"That inning in its entirety was quality at-bat after quality at-bat," Hinch said. "We had four quality plate appearances in the first four or five hitters. That's how you piece together runs, and that's certainly how we came back tonight."
Last year, Carter hit 37 homers. His homer on Saturday not only gave the Astros a two-run lead, it also was a reminder of how Carter can turn games around with one swing.
"I try to hit the ball hard and whatever happens, happens," Carter said. "I'm swinging better now. I'm seeing better pitches. I think things are about to turn around for me."
Added Scott Feldman, who was the beneficiary of the home runs in picking up the win: "He [Carter] has a nice little flick of the wrist. He's such a strong guy. He's in his two-strike approach, he just flicks the ball opposite field like that.
"It is just awesome to see. When he gets hot, we know what kind of damage he can do."
Richard Dean is a contributor to MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.