The Yankees and Giancarlo Stanton couldn’t wait any longer for him to get back from a quad injury he suffered in Game 1 of the ALCS in Houston.

After sitting out the next three games, Stanton returned for Friday night’s Game 5, with the Yankees a loss away from their season ending.

“It’s now or never,’’ Stanton said prior to the game. “It’s a must-win game, so I’ve got to be in there and have an impact.’’

The Yankees were looking for an impact at the plate anywhere they could find it — including at DH, where Edwin Encarnacion had been struggling.

Stanton took Encarnacion’s spot at DH and hit cleanup in his first action since the Yankees’ Game 1 in Houston, when Stanton strained his quad running out an infield single. He remained in that game and later homered, but he was held out of the lineup the next three games — all Yankees losses.

After Thursday’s loss, when the Yankees went hitless with runners in scoring position for a second straight game, Stanton helped Aaron Boone make his decision.

“He actually did come by my office [Thursday] night and we both kind of said, ‘Let’s go,’ ’’ Boone said.

Stanton said he could have pinch hit at least in Games 3 and 4.

“I was ready if the game dictated it, but it didn’t,’’ Stanton said.

He continued to do pregame work and isn’t ready to play defense, but the Yankees entered Friday with nothing to lose — needing three straight wins to advance to the World Series.

He missed much of the season, first with a torn left biceps and then a left shoulder injury. A left calf injury also sidelined him before Stanton finally returned, only to be shut down again after suffering a sprained right knee on June 25.

Stanton made it back on Sept. 18 and played nine games before the end of the regular season, clearly not yet at full strength.

He didn’t provide much production in the ALDS sweep of the Twins, but did display patience at the plate. Then he homered in Game 1 of the ALCS in the Yankees’ rout of Houston.

There were no signs of an injury when he spoke after the game, but he was held out of the lineup as he did agility drills on the field and hit in the cage to try to get back.

“That’s the most frustrating part about these past couple of days,’’ Stanton said of watching the team struggle to score runs. “That’s what we need. We need it now.’’

On Friday, Stanton wasn’t interested in discussing how close he was to full health.

“I’m playing,’’ Stanton said. “There’s no percentages. … We don’t have time for that. It’s a must-win. I’m in there to make an impact. That’s all I can do.’’