TORONTO — OK, sometimes you can predict baseball.

After partying into the night Saturday to celebrate their playoff berth, including a full-out champagne and beer clubhouse sprayfest, the Yankees went meekly Sunday afternoon, falling behind by eight runs early in a 9-5 loss to the Toronto Blue Jays in front of 47,394 at Rogers Centre.

“You worry about it a little bit as you go through the emotions of last night and clinching a spot,” Joe Girardi said of a possible hangover effect. “But our guys continued to battle back. We didn’t make pitches today.”

That began with starter Jaime Garcia, who didn’t have much, and the bullpen was just as bad. The offense was mostly quiet, with Aaron Judge a notable exception. He hit homers Nos. 47 and 48 to get within one of Mark McGwire’s rookie record set in 1987.

It was an otherwise collective fail, not the kind of performance seen often from a team that had won 15 of 20.

“You really couldn’t ask to play any better than we have this month,” Chase Headley said. “Unfortunately, Boston’s gotten hot at the same time.”

advertisement | advertise on newsday

What the loss did was further clarify the Yankees’ postseason situation. Even while celebrating the playoff spot Saturday, they said the AL East crown remained their goal. But with Boston’s victory over the Reds on Sunday, the Yankees fell five games back with seven to play, cutting Boston’s magic number to three. That means they can begin the process of setting things up for the Oct. 3 wild-card game, primarily manipulating the rotation so ace Luis Severino will be on the mound that night with the optimal amount of rest.

“Obviously, we’re going to keep playing, but you have to start to think ahead a little bit too,” Girardi said, “and try to set up what possibly could be us playing on Tuesday.”

Garcia (1-3, 4.70) was charged with five runs — three of which scored on Russell Martin’s two-out double off Jonathan Holder in the third — and allowed four hits and three walks in 2 1⁄3 innings.

His outing started poorly. Teoscar Hernandez led off the first inning with his third monstrous home run in the three-game series, going deep on Garcia’s second pitch. Kevin Pillar doubled, stole third and scored on Darwin Barney’s sacrifice fly in the second.

“There’s no excuse on my part,” Garcia said, referring to the previous day’s celebration. “I totally take the blame for this game.”

Yankees videos

Toronto knocked him out an inning later as his command completely abandoned him. Justin Smoak doubled with one out and Garcia proceeded to throw eight straight balls in walking Jose Bautista — likely playing in his final home game as a Blue Jay and feted by fans throughout the contest — and Kendrys Morales. Holder replaced him and got Pillar to foul out, but Martin lined a 1-and-2 fastball into the gap in right-center for a 5-0 lead.

Former Patchogue-Medford star Marcus Stroman (13-8, 3.06) allowed three runs, five hits and four walks in 5 2⁄3 innings for the Blue Jays. After Bryan Mitchell gave up four runs in the fourth on RBI singles by Josh Donaldson and Bautista and a two-run single by Morales on which Bautista was thrown out at the plate, Stroman took a 9-1 lead into the sixth, when Judge hit the first of his two homers and Greg Bird lined an RBI double off the rightfield wall. Judge’s two-run blast off Ryan Tepera in the seventh made it 9-5.

“We’re just going to play out the schedule and see what happens,” Headley said. “Mathematically, we’re still in it, so all you can do is keep going out and try to win games. If it happens, it happens. If it doesn’t, we’ll figure out the wild card then.”