BOSTON – Just when it seemed the Yankees rotation was finally getting some good news, yet another starter is hurt.

David Phelps left Sunday’s game with right elbow inflammation. He will be evaluated by team doctors on Monday, but the initial diagnosis gives the Yankees at least some hope that this is a relatively minor issue.

“I believe he’s going to pitch again,” manager Joe Girardi said. “I don’t know if it’ll be his next turn, but I believe he’s going to pitch again. He had the MRI (last month) and it came back clean. He might need a little time out.”

With Phelps pulled after just two innings, the Yankees offense rallied for a much-needed 8-7 win against the Red Sox. The Yankees won their last two games at Fenway Park, letting them split this six-game trip through Texas and Boston.

Brett Gardner delivered a go-ahead home run in the sixth inning — his 15th homer of the season — and new reliever Esmil Rogers consistently hit 95 mph with his fastball while pitching three hitless innings in his Yankees debut. The Yankees have now scored at least six runs in three of their past five games.

Phelps lasted just two innings, but that was enough time for him to allow five runs on six hits and two walks. He coughed up a two-out, two-run home run to Dustin Pedroia in the second inning, and the Yankees went to their bullpen to start the third.

It initially seemed safe to assume Phelps had been pulled due to ineffectiveness, but the Yankees announced three innings later that he would be evaluated because of the elbow injury. Phelps said he’s pitched through elbow soreness for nearly three weeks, and a previous MRI revealed no ligament damage. The inflammation is near the triceps, not in the area that sometimes requires Tommy John surgery.

“This time it just didn’t loosen up,” he said. “That was the cause for concern.”

With Phelps out of the game, David Ortiz launched another two-out, two-run home run — this one off long man Chase Whitley — and the Red Sox offense was off and running.

The Red Sox, though, weren’t the only team hitting the ball hard.

With five doubles in the first five innings, the Yankees kept pace. Gardner doubled in two runs in the second inning, Stephen Drew doubled in a run in the fourth, and Chase Headley doubled in another run in the fifth.

When Drew followed Headley with a two-out, two-run single, the Yankees had pulled even, tying the game at 7 after five innings. Gardner led off the sixth inning with a home run and finished a triple short of the cycle. He reached base four times, continuing his standout season.

Rogers, who was claimed off waivers on Thursday, could be a rotation candidate should Phelps land on the disabled list. He looked sharp in his first big league game since May 22 with Toronto.

For the second night in a row, relievers Dellin Betances and David Robertson finished off a close Yankees win.

Yankee clippings: Masahiro Tanaka’s partially torn elbow ligament was examined on Friday, and he’s expected to begin playing catch on Monday. Even if all goes well, he’s still several weeks from rejoining the Yankees rotation. … Michael Pineda threw 31/3 scoreless innings in a Triple-A rehab start on Sunday. He’s expected to make two more minor league starts before returning from a shoulder injury that’s had him on the disabled list since May 6. … To open this week’s home stand, the Yankees face the past three American League Cy Young winners: Max Scherzer on Monday, David Price on Tuesday, and Justin Verlander on Wednesday.