[Ads /]
Gleyber Torres also went deep for New York, and Nestor Cortes struck out a season-high eight over four innings during an encouraging return to the mound following two months on the injured list.
Verlander (6-6) allowed two runs and seven hits, losing a regular-season start to the Yankees for the first time since June 2015 with Detroit. He struck out four, walked two and fell to 10-8 against New York in the regular season.
RELATED: Justin Verlander trade: Newly-reacquired Astro on what changed with Mets, when he's making 1st start
In his first start for the Astros since winning Game 5 of the World Series at Philadelphia last November, the 40-year-old right-hander averaged 94 mph on his 52 four-seam fastballs.
"It was a battle, the first three innings," Verlander said. "I was kind of all over the place control-wise. Not exactly sure why, but I was able to rein it in, make some better pitches and keep us in the ballgame. So definitely felt better after the last few innings."
After helping the Astros to a second World Series title and winning his third AL Cy Young Award, Verlander signed an $86.7 million, two-year contract with the Mets as a free agent in December.
But the Mets stumbled this season and Houston reacquired Verlander for a pair of minor league prospects at Tuesday's trade deadline. New York also agreed to send $35,520,753 to the Astros as part of the deal. And if Verlander exercises his 2025 option, the Mets would send Houston another $17.5 million.
"It felt oddly familiar," said Verlander, who pitched in the Bronx for the Mets on July 25. "It was like this moment of time that I wasn't here. It was really only three months because I missed the first month with injury.
[Ads /]
"So it's been very easy to kind of feel like I've been here the whole time. I love these guys and being able to go out there and compete with them again, it's a lot of fun."
Anthony Volpe lifted a sacrifice fly in the second for the Yankees, who won for the third time in four games. Torres homered leading off the eighth against Kendall Graveman.
"I thought we had good at-bats against Verlander," Yankees manager Aaron Boone said. "He was struggling to find his good command early. I thought we waited him out, hit some balls on the nose. Then he kind of really settled in and started making pitches."
Verlander retired Aaron Judge four times, on three flyouts and a popout. He finished his 499th career start by getting the slugger on a popup after manager Dusty Baker visited the mound.
"Obviously, that was a big spot - one of the best hitters in the world," Verlander said.
Giancarlo Stanton reached three times for the Yankees, but was easily thrown out by center fielder Mauricio Dubón attempting to score from second on DJ LeMahieu's base hit in the third.
RELATED: Welcome back, JV! Astros strike deal to acquire ace Justin Verlander from New York Mets
[Ads /]
Jose Altuve hit his 200th career homer off Cortes in the third, but that was Houston's only hit against the left-hander.
The Astros fell to 11-6 in their last 17 games and struck out 16 times - one shy of their season high.
"Usually we don't strike out that much, but they were dealing over there," Baker said.
Verlander began his 103rd regular-season start with the Astros by getting a called third strike on Bauers. He called out a trainer to deal with a bloody knuckle and struck out LeMahieu with two on to end the first.
After giving up consecutive hits to open the second, Verlander allowed Volpe's sac fly that put the Yankees ahead.
Altuve's milestone homer to left field tied it in the third, but Bauers gave the Yankees a 2-1 lead in the fifth.
The Associated Press contributed to this report.