"I knew it was foul the whole time," Headley said. "I mean, it's a bad feeling. The ball's an inch foul. [If] it goes one inch the other way, we're winning the game. But it didn't."
Headley went back to the plate with an 0-2 count on him. He took two balls before swinging through a 95-mph fastball for the first out of the inning.
Clint Frazier then flew out to shallow right field, and Ji-Man Choi struck out to strand runners at first and second. The Brewers held onto their 5-3 lead heading into the seventh inning.
The Yanks' threat in the sixth was just one of four times they stranded two runners on base to end an inning without scoring a run.
Just like with Headley's near-homer, the Yankees ran into bad luck when Gary Sanchez hammered a 112-mph lineout to right field in the seventh. The liner nearly got over Brewers right fielder Domingo Santana's head.
If it gets by Santana, the Yanks would've scored Brett Gardner easily from second. With two outs and Aaron Judge running from first base on contact, there was a chance he too would've scored on the play, which would've tied the game.
"As it was going out, I thought that it had a chance," Sanchez said through an interpreter. "But at the same time, I noticed the outfielder made a really good adjustment and stayed with it. Eventually, he made the catch."
The Yankees were 1-for-16 with runners in scoring position, that one hit being Frazier's two-run homer in the fourth inning, which at the time cut the Brewers' lead to 4-3.
"That's the difference in the game," manager Joe Girardi said. "When you go 1-for-16, it's pretty hard to win a game."
Matthew Martell is a reporter for MLB.com based in New York. This story was not subject to the approval of Major League Baseball or its clubs.