Pinch hitter Neil Walker reacts after hitting a walk-off home...

Pinch hitter Neil Walker reacts after hitting a walk-off home run as the Yankees defeated the White Sox Tuesday night. Credit: AP/Bill Kostroun

Aaron Boone called his team “sluggish” after it mostly sleepwalked through a loss to the awful White Sox Monday night. The early reviews a night later weren’t terribly encouraging as the Yankees, who committed three errors Monday, committed two more early Tuesday and produced all of one hit through five innings.

But the Yankees broke out late, getting a pair of two-run homers by Miguel Andujar and Aaron Hicks to tie it before pinch hitter Neil Walker’s one-out homer in the ninth lifted them to a 5-4 victory at the Stadium.

“We didn’t play great last night, we were flat in the early going today,” said Walker, who crushed a first-pitch fastball from righty Dylan Covey to right-center, the utility man’s ninth homer. “These are integral games. We’re grinding to score runs, but finding ways to win like tonight are [important] going into September."

Walker gave the Yankees (84-48), winners of 16 of their last 22, their 13th homer in the last six games and 40 in their last 22. They remained 6 1/2 games behind the Red Sox, who beat the Marlins, 8-7.

“I’ve talked a lot through these last two, three weeks, it’s not easy for us right now,” Boone said. “We’re kind of grinding through some things. It’s a tough stretch, but these guys continue to find a way.”

After the White Sox (52-80) put three on the board in the sixth to make it 4-0, Andujar, who has emerged as the favorite for AL Rookie of the Year, came through. Brett Gardner led off the inning with a triple, the Yankees’ second hit of the game. But Giancarlo Stanton, still stuck on 299 homers, and Hicks popped out. Andujar fell behind James Shields 0-and-1, then ripped a fastball halfway up the bleachers in left-center for his 22nd homer, making it 4-2.

Stanton led off the eighth with a single against Juan Minaya, snapping an 0-for-14 skid. Hicks came next and launched a full-count pitch to right for his 22nd homer, tying it at 4.

“Just flat, not really driving guys in that were in scoring position,” Hicks said in describing the Yankees Monday and the first half of Tuesday’s game. “We broke out of it today.”

Shields, who came in 5-15 with a 4.59 ERA, allowed two runs and four hits in 5 2/3 innings. The Yankees’ Lance Lynn, who allowed five runs in each of his previous two outings, allowed three runs and seven hits over 5 2/3 innings. The righthander departed with two on in the sixth, but Jonathan Holder allowed both runners to score, and one more, in a three-run inning.

“My sinker was really good tonight, and then I was able to just move the ball in and out,” said Lynn, who walked one and struck out five. “All in all, it wasn’t terrible. Just some bad luck in the end, and the offense came back and bailed us out.”

An embarrassing error by Greg Bird on the first batter of the game forced Lynn to work out of a mini-jam. Yolmer Sanchez led off with a routine grounder that second baseman Ronald Torreyes fielded cleanly. He threw to first, but Bird flat dropped the ball. Nicky Delmonico flied to center, and Sanchez stole second as Avisail Garcia swung and missed for the second out. Lynn struck out Daniel Palka swinging at a 95-mph fastball to end the 19-pitch inning.

After Lynn worked around another error in the third – Andujar on a grounder – the White Sox scored in the fourth on Garcia's double.

Lynn, a trade deadline acquisition, never thought his new club was out of it, even as the deficit climbed to 4-0.

“I’ve seen it before,” Lynn said of the offense’s potential.

He smiled.

“It’s a fun ending,” Lynn said. “Wasn’t it?"

More Yankees headlines

Newsday LogoCovering LI news as it happensDigital AccessOnly 25¢for 5 months