Gary Sanchez’s first-inning passed ball led to two runs, and that was enough for the Yankees to lose to the Indians, 2-1, in the first game of a doubleheader Wednesday at Yankee Stadium. That close defeat stung even more when the Yankees were steamrollered in the nightcap, 9-4.

The losses tightened the AL wild-card race. The Yankees held a 1 1/2-game lead over the Twins for the first spot going into Minnesota’s night game, with six other teams chasing.

The Yankees dropped all three in the series to the AL Central-leading Indians, who have been pitching lights out lately. Cleveland had a streak of 30 scoreless innings snapped Monday in a 6-2 victory before Tuesday’s rainout led to Wednesday’s twin bill.

Not exactly the way the Yankees wanted to go into the four-game home series against the AL East-leading Red Sox that begins Thursday night. Boston beat Toronto, 7-1, completing a three-game sweep that extended its lead to 5 1⁄2 games over the Yankees.

“You’ve got to move on,” manager Joe Girardi said. “You’ve got to put this behind you. Our struggles on the (2-4) home stand have really been when we haven’t scored runs. We need to swing the bats better, and that’s the bottom line.”

In Game 2, Jordan Montgomery (7-7) allowed four first-inning runs, and the Indians poured it on later against the Yankees’ bullpen. The Yankees trailed 9-1 until Greg Bird hit a three-run home run in the ninth.

advertisement | advertise on newsday

Sanchez, who was benched briefly at the beginning of the month for poor defense, had shown improvement. He also had been hitting home runs in bunches, which will paper over a lot of faults. But the Indians scored their first run in the opener when Sanchez let a low — but not too low — pitch get past him for a passed ball, his AL-worst 13th. The ball touched dirt only after it got past Sanchez.

“I can’t tell you why,” Girardi said. “Those are things that we continue to work on with him. It’s unfortunate. It probably led to another run for them and we lose a very tight ballgame.”

Cleveland made it 2-0 when Yandy Diaz followed with an RBI single off Jaime Garcia (5-9), who allowed those two runs (one earned) in five-plus innings.

“I tried to catch it,” Sanchez said through his translator. “I dropped it. It’s something I need to forget about and focus on the games coming up.”

Said Garcia: “That’s kind of where I wanted to throw it. But my stuff sometimes moves. I don’t even know when it moves. That’s the pitch I wanted to throw, but all I know is if I was a catcher, I wouldn’t want to catch me . . . It’s a play that obviously a run scored from third, but I also gave up a hit right after. So I take the blame from that and focus on we didn’t win the game, and that’s on me.”

Yankees videos

Trevor Bauer (14-8) gave up one run in six innings, on Didi Gregorius’ two-out double in the third. It was the Yankees’ only hit with runners in scoring position in seven tries.

There were no close-game worries in the nightcap as the Indians sent 10 men to the plate in the first inning and scored four times against Montgomery, who was called up to make the start. He pitched three scoreless innings after that, but Chasen Shreve allowed a solo homer to Edwin Encarnacion in the fifth. Caleb Smith gave up a two-run shot to Yan Gomes in the seventh and a solo blast to Francisco Lindor in the eighth.

It was a long and ugly day for the Yankees. Can they put it behind them?

“We’ve got to,” Bird said. “There’s no other way to do it.”