BOSTON — The momentum from one of the season’s most impressive victories failed to carry over. Not even close.

After beating ace Chris Sale on Saturday night, the Yankees slumbered through a 5-1 loss to the Red Sox on Sunday at Fenway Park, again giving Sonny Gray little offensive support. The Yankees (66-57) managed only three hits. They lost two of three to the Red Sox (71-52) for the second consecutive weekend and fell five games behind the AL East leaders.

“We need to continue to play well so when they come to our place [Aug. 31-Sept. 3], it means something,” Joe Girardi said. “We probably had a chance to win four of the six and we end up winning two of the six, and that’s frustrating.”

Brett Gardner doesn’t think the five-game deficit is insurmountable. “You can make up five games in two weeks,” he said. “We’ve still got six weeks left to play but plenty of time left to catch them. We don’t need to worry about what they’re doing, we need to worry about ourselves.”

The Red Sox had 12 hits, with Brock Holt, Andrew Benintendi, Mitch Moreland, Sandy Leon and Jackie Bradley Jr. getting two each and Bradley driving in three runs.

Aaron Judge wasn’t the only Yankee who didn’t hit Sunday, but his struggles have lasted far longer, with seemingly no end in sight. He went 0-for-4 and extended his MLB-record streak to 37 games with at least one strikeout. Judge has 63 strikeouts in 131 at-bats in that stretch, but Girardi said he will continue to hit third.

“I know I’m not getting the job done,” Judge said. “I want to be there. I’m a three-hitter, I’m in the middle of the order and I need to be that guy for the team. It’s a little disappointing not being able to get the job done, but you can’t pout, you can’t cry. You have to keep working and move on.”

advertisement | advertise on newsday

The Yankees’ run came in the fifth on Gardner’s 20th homer, a screaming liner off Rick Porcello that just cleared the short wall in right near the Pesky Pole. That cut Boston’s lead to 2-1.

“He really didn’t give us very many pitches to hit today,” Girardi said of Porcello. “It was his slider, cutter, sinker combination with his curveball, and it just didn’t seem like he made many mistakes.”

Porcello (8-14, 4.48) and three relievers retired 14 straight to end it.

Gray, who did not receive any run support in his first two outings as a Yankee, wasn’t sharp but limited the damage. He allowed two runs, seven hits and two walks in five innings and did not strike out a batter for the first time in his big-league career. The runs off Gray (7-8) came when Bradley ripped a fastball for a two-out, two-run triple into the triangle in right-center in the second inning.

Porcello, who had a 3.61 ERA in his previous seven starts, allowed one run, three hits and three walks in six innings. Brandon Workman and Addison Reed each threw a scoreless inning and, after Tommy Kahnle gave up two runs in the eighth to make it a non-save situation, All-Star closer Craig Kimbrel worked a perfect ninth.

Yankees videos

The Yankees had some chances early — they were 0-for-4 with runners in scoring position and stranded five through four innings — and none late.

“A lot of close games, a lot of good pitching on both sides,” Gardner said of the two series against the Red Sox. “With the win yesterday, it would have been great to win the series today, but it didn’t happen. We have a lot of baseball left. Don’t love the position that we’re in, but we’re well within striking distance.”