Carlos Corporan, L.J. Hoes and Matt Dominguez hit consecutive doubles off Mets relievers Gonzalez Germen and Carlos Torres to drive in the first five runs in the Astros' seven-run seventh.
Hoes drove in three runs for Houston.
Anthony Recker hit a two-run off Astros starter Scott Feldman in the fifth inning.
Gee faced 19 batters in six innings, striking out seven.
Jose Valverde, named the Mets' setup man earlier Wednesday, gave up two runs in the eighth, one of them unearned. The Mets optioned right-hander Vic Black to the minor leagues.
The 36-year-old Valverde, who has 286 career saves, signed a minor league contract on Feb. 12. The Mets moved them to the 40-man roster on Wednesday.
''He's going to hopefully be that bridge to (closer Bobby Parnell),'' said manager Terry Collins. ''And on those nights when Bobby's going to need a night off, it's Jose who's going to pick up the slack.''
Astros manager Bo Porter announced Lucas Harrell and Dallas Keuchel will start the fourth and fifth games of the regular season on April 4 and 5. Feldman, Jarred Cosart and Brett Oberholtzer will pitch the first three games against the Yankees.
The Astros settled on left fielder Robbie Grossman as the No. 2 hitter in their lineup.
The 24-year-old, switch-hitting Grossman will experience his first major league opening day on Tuesday when the Astros play the New York Yankees. He had two stints with the Astros last season and hit .322 over his last 35 games.
''I expected some of the guys who have been here more time to hit more at the top of the order,'' Grossman said. ''That was my personal goal to be near the top of the order, and I knew I had to put in my time before that could happen.''
He has hit .362 with one home run in 19 exhibition games.
''In the beginning of the spring that wasn't the plan, but Robbie Grossman continued to swing the bat well,'' Porter said. ''He's always been a high on-base guy and the overall goal is to try and get as many guys on base as possible in front of Jason (Castro) and (Jose) Altuve, arguably our two best hitters.''
When Altuve bats fourth, against most left-handed pitchers, Cris Carter will bat fifth, Porter said.
Mets: Jonathan Villar, who walked with two outs in the third, was the only Astros batter to reach base against Gee.
Astros: Feldman, who will pitch the Astros' season opener Tuesday against the New York Yankees, gave up five hits and three runs in 5 2-3 innings, striking out six.
Astros: Porter reported that the blister on Cosart's right hand is ''much improved'' according to trainers, and he remains on schedule to start the Astros' second game on Wednesday.
GET OVER IT
Black had a disappointing spring after going 3-0 with a save for the Mets in 15 relief appearances last summer.
''I told him I'm going to give you 12 hours'' to be angry, Collins said after sending him down, ''and then get after it.''