The news came out of Florida inning by inning on the scoreboard high above the Yankees’ bullpen, just to the right of the monstrous video board.

And the last electronic message told the Yankees the Red Sox had lost to the Rays, which left the door open for the Yankees to pull closer to the AL East lead.

With the Yankees behind all day, a run in the eighth made it easier to foresee a big ninth inning. And when Jacoby Ellsbury doubled with one out and Buck Showalter opted to intentionally walk Aaron Judge — the potential tying run — with two outs to get to Gary Sanchez — the potential winning run — the crowd buzzed.

Here was Sanchez, the Yankees’ best all-around hitter, against Orioles closer Zach Britton, a power lefty whose personal strike zone is between the bottom of the knee and the top of it.

“I was ready for the battle,’’ Sanchez said. “I was ready for it.’’

Sanchez was willing but not able, and the Yankees tasted a damaging, 6-4 loss that was witnessed by a Yankee Stadium gathering of 38,189.

With 13 games left, the Yankees trail the AL East leaders by three lengths, and at this point it would be a shock if they sneak by the Red Sox, whom they don’t face again. Though you won’t hear the Yankees talk about copping the first of two wild-card spots until they are eliminated from the AL East race, that’s where the Yankees are headed.

With the Twins, who are four games back of the Yankees, in The Bronx for three games starting Monday, the Yankees have a chance to bury them and perhaps allow the Angels to eke past Minnesota to face the Yankees on Oct. 3 at the Stadium.

Brett GardnerBill Kostroun

When the Yankees acquired Sonny Gray from Oakland on July 31, they had games like Sunday’s in mind for the right-hander. While his first eight starts as a Yankee were solid, Sunday’s wasn’t. In four innings, the shortest outing of his season, Gray gave up five runs and six hits. His 80 pitches were also a season low. The biggest blow was a three-run homer by Tim Beckham in the fourth inning that landed in the left-field bleachers and gave the O’s a 5-1 lead.

“That was tough to see and tough to go through,’’ said Gray, 9-11 overall and 3-6 with the Yankees.

The O’s hiked the lead to 6-1 in the fifth. But having scored 30 runs in the first three games of the series against the Birds’ woeful pitching the Yankees weren’t done. Matt Holliday drove in two runs with a double in the sixth and Starlin Castro’s sacrifice fly plated another in the eighth that cut the deficit to 6-4.

Britton surfaced to strand two in the eighth and added intrigue by giving up an opposite-field double to left to Ellsbury with one out in the ninth. Brett Gardner’s ground out to the right side moved Ellsbury to third and as Judge walked to the plate the crowd had what it wanted: Britton vs. Judge. Instead they got Britton vs. Sanchez.

Check swing, strike. Ball. Swinging strike. Ball. And finally a swing and miss at a 96-mph fastball that killed a chance for a big victory.

“Of course. You lose today on a day the Red Sox lose,’’ Girardi said when asked if he viewed the Yankees’ first loss in five games as a missed opportunity. “But we continue to play well. Even on a day when we lose we had an opportunity in the ninth inning and that is what you want. We just need to continue to play well.”

And get ready for Oct. 3 at home in a one-and-done situation against an opponent to be determined.