BOSTON — Rick Porcello wasn't celebrating after striking out 13 in his strongest start of the season.
"You go out there and you want to win. That's the bottom line. I think anybody would tell you that," said Porcello, whose previous high for strikeouts was 11. "It's a nice night for me personally but as far as the team goes we didn't accomplish what we wanted to."
Porcello (6-12) scattered five hits over eight innings and struck out five straight batters in the first two innings.
New York manager Joe Girardi, a former catcher, acknowledged how tough Porcello was.
"Our guys said he had as much comeback in his movement on his fastball as they've ever seen tonight," Girardi said. "We knew he had good sink, but they said it was huge tonight."
Brett Gardner homered and Stephen Drew hit a two-run double for the Yankees, who evened the series at one game apiece.
Michael Pineda (10-8) pitched six strong innings for the Yankees, scattering four hits and striking out seven and Andrew Miller picked up his 29th save.
Boston had a promising rally going in the eighth that quickly fizzled on an attempted double steal. Mookie Betts led off the eighth with a single and Xander Bogaerts singled with one out, giving Boston runners at first and second for slugger David Ortiz.
Ortiz struck out in his first three at-bats and the Red Sox sent both runners.
"At that point we figured it was a good risk," interim manager Torey Luvollo said.
The gamble failed as Betts was called out when he slid into third and briefly lost contact with the base. Replays showed Betts telling third-base umpire Vic Carapazza that third baseman Chase Headley pushed him off the bag. The Red Sox challenged the call, which was confirmed after a video review but still disputed by Betts after the game.
"I felt like I was safe the whole time," Betts said. "It caught me a lot by surprise because I didn't think my foot came off. The only reason why — if it did — was because I felt like he pushed me, whether it was intentional or unintentional."
The Yankees picked up two unearned runs in the fifth after Didi Gregorius hit a grounder that got past Travis Shaw at first base. Alex Rodriguez, who led off with a single, trudged from first base to third as the ball slowly rolled down the right-field line and Gregorius reached second on Shaw's error.
Both scored easily when Drew followed with a double that rolled all the way to the wall in left-center, giving the Yankees a 2-1 lead.
Boston had been up 1-0 since the third, when Jackie Bradley Jr. doubled and scored on Pablo Sandoval's single to right.
Yankees: RHP Andrew Bailey was among the additions the Yankees made to the expanded roster Tuesday. Bailey hasn't pitched in the majors since seriously injuring his shoulder while pitching for Boston in 2013.
Red Sox: LF Hanley Ramirez missed his fifth straight game with a sore right shoulder. Luvollo said he hopes Ramirez will return before the end of the season, but he won't be playing in the outfield again. Ramirez struggled defensively through much of the season during Boston's attempt to convert him to an outfielder.
Yankees: RHP Masahiro Tanaka (10-6) makes his 20th start of the season. Tanaka is 11-5 in 18 career starts on the road and 1-1 in Boston.
Red Sox: Rookie LHP Henry Owens (2-1) makes his first start at home since going eight innings in a win over Kansas City on Aug. 21, holding the Royals to two runs and four hits. Owens got a no-decision last week against the New York Mets.