Headley lined a pinch-hit double to break a seventh-inning tie, Beltran launched his 400th career home run and the Yankees wrapped up a successful homestand by beating the Chicago White Sox 7-5 Sunday.
The Yankees overcame a hiccup by reliever Dellin Betances to finish a much-needed 7-3 against the AL Central-leading White Sox, World Series champion Kansas City and eternal rival Boston.
"It really shows we're capable of winning against good teams," Beltran said.
The Yankees also have their vaunted bullpen set up exactly the way they envisioned.
"Obviously, it's a big homestand for the whole team," Headley said. "I think we're playing the way we're capable of."
The White Sox have dropped four of five overall, and lost for the 13th time in their last 15 games at Yankee Stadium.
"We're just going to enjoy the off day on Monday, that's realistically what we're looking at right now," said Adam Eaton, who homered and squeezed home a run.
"We had a long trip, Texas and here, and so when we get home to Chicago, I'm sure we're all really going to enjoy family and take a nice relaxing day with family, so we're excited about that," he said.
A day after striking out all four batters he faced, Betances (1-2) was shaky. He took over in the seventh with a 5-4 lead, but Jose Abreu and Todd Frazier greeted him with singles and Melky Cabrera hit a tying double. Betances recovered to retire the next three batters.
Headley was stuck in a season-long slump before going 7 for 20, including his first extra-base hits of the year, in seven games since his 32nd birthday.
Beltran's two-run drive in the sixth put the Yankees ahead 5-4. He became the 54th big leaguer to reach 400 home runs, with Mickey Mantle, Eddie Murray and Chipper Jones the other switch-hitters to do it.
Beltran connected from the right side, immediately after lefty Zach Duke took over for lefty reliever Dan Jennings. Beltran joined Carlos Delgado and Juan Gonzalez as players born in Puerto Rico to hit at least 400 homers.
"Just to be next to them, it motivates me to finish my career strong," Beltran said.
Beltran said he's felt "double responsibility" over the years to properly represent his teams and his homeland. Hitting No. 400 "means a lot to me and my family and Puerto Rico," he said.
Beltran was able to retrieve the milestone ball, too, trading two signed bats for the souvenir.
Injured Yankees slugger Alex Rodriguez was the first player to greet Beltran at the top step of the dugout, giving his teammate a big hug and taking off his batting helmet.
Chicago's first error in May, a wide throw by second baseman Brett Lawrie on a slow roller by Jacoby Ellsbury, set up Beltran's home run. The speedy leadoff man made his first start since May 6 after straining his hip.
Brian McCann homered in the Yankees eighth.
"We're playing a lot better baseball, that's for sure," manager Joe Girardi said. "We're swinging the bats, we're scoring runs, we're winning close games."
Ellsbury reached on catcher's interference for the fourth time this year, tipping Alex Avila's mitt on a swing. The big league record for a season is eight by Roberto Kelly in 1992.
Ellsbury has done this before -- he's caused 18 calls of catcher's interference since 2007, two more than Carl Crawford for most in the majors during that span.
Yankees: LHP CC Sabathia (strained left groin) threw a simulated game and did fielding drills in the morning. He's set to come off the disabled list and start Friday night in Oakland.
Why the Mets have to win the NL East
Chris "Mad Dog" Russo and Stephen A. Smith both express how important it is for the Mets to play well vs. the Braves and win the NL East.
Stephen A. calls out Blue Jays' pitchers for walking Aaron Judge
Stephen A. Smith sounds off on MLB pitching after Aaron Judge's four walks against the Blue Jays.
The biggest storylines down the stretch of the MLB season
Nicole Briscoe and Xavier Scruggs discuss Aaron Judge's quest for the AL home run record and Triple Crown.
Fantasy baseball pitcher rankings, lineup advice for Wednesday's MLB games
Everything you need to know to place your MLB bets and set your fantasy baseball lineups for Wednesday, September 28.
MLB discusses plans for New York Mets-Atlanta Braves series with Hurricane Ian looming
Major League Baseball is considering contingency plans for this weekend's crucial series in Atlanta between the Mets and Braves as Hurricane Ian bears down on Florida's Gulf Coast.
Fantasy baseball forecaster: Team hitting ratings
Stay ahead of the game and optimize your fantasy baseball hitters with our forecaster, which provides a rolling 10-day outlook of every team's hitting matchups as well as the potential for stolen bases.