Garcia (4-3) permitted one run and six hits, retiring 11 of 12 batters over one stretch. The right-hander struck out six and walked one in his fourth consecutive win.
Houston manager Dusty Baker said he has seen Garcia's confidence and endurance grow this season as well as his ability to pound the strike zone.
Garcia said he is throwing his slider with more confidence, which is giving him another pitch for his arsenal.
''His command of the secondary pitches was very important,'' Baker said. ''They're a good hitting club over there, and he was in control and command.''
Altuve led off the first with his eighth homer, a drive to left-center against Garrett Richards (4-4). It was Altuve's third leadoff homer this season.
Chas McCormick drove in Yordan Alvarez with a sacrifice fly in the fourth, and Houston opened a 5-1 lead with three runs in the seventh.
Kyle Tucker, who had three hits, scored on an error by second baseman Marwin Gonzalez. Carlos Correa drove in Myles Straw with a bases-loaded walk, and Alvarez had a run-scoring infield single.
Alvarez had two hits in his return to the lineup after missing five games with a sore right wrist. The Astros won despite going 1 for 10 with runners in scoring position.
''(Richards) helped us with a number of walks, and they helped us on defense tonight,'' Baker said. ''We'll take it. ... Sometimes you're prone to make mistakes, and we capitalized on them tonight.''
Richards surrendered two runs and four hits in six innings. He walked four and struck out five.
''He gave us a chance to win,'' manager Alex Cora said. ''He made some good pitches when it counted. He battled. He didn't have his best stuff, but against a tough lineup, they only scored two in six innings. Obviously, the walks and all that put him in a bad spot, but I thought he was outstanding.''
Richards has allowed three or fewer runs in each of his last four starts.
''Every night you're going to be dealt a different hand, and you have to make it work,'' he said. ''I've been pleased with how I have been able to make adjustments on the fly, keep the ball in the zone for the most part, make pitches when I need to and give us a chance to win.''
Boston pitchers walked eight, including Altuve three times. Alex Verdugo had two hits for the Red Sox.
Astros: OF Michael Brantley (right hamstring tightness) has been hitting and ran on Tuesday, Baker said. Brantley likely won't need a rehab assignment and could be back early in the next road trip, which starts Friday, Baker said. ... 1B Yuli Gurriel (left middle finger inflammation) returned to the lineup after missing three games. He went 0 for 3.
RHP Nick Pivetta (6-0, 3.86 ERA) starts Wednesday for Boston, and the Astros will send LHP Framber Valdez (0-0, 2.25) to the mound in the third game of the four-game series.
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.