Gardner sustained his injury when he was hit by a pitch from Kansas City reliever J.C. Gutierrez in the sixth inning. He stayed in the game to play the field in the top of the seventh before Alberto Gonzalez replaced him to begin the eighth.
Hafner's injury occurred in the batting cages beneath Yankee Stadium. The veteran slugger was taking swings in the cages at some point during the fifth or sixth and fouled a ball off his left foot.
"I just turned it up as high as it goes, like 95 or 100 [mph], and the ball moves all over the place," Hafner said. "One ball just took off. I foul tipped it and squared up my foot pretty good."
Some Yankees players call the machine "The Humbler" because of the movement on pitches. Hafner said he likely wouldn't turn the machine up to the max speed again and would probably stop hitting in the cage during games.
"It doesn't happen very often," manager Joe Girardi said. "I don't get summoned to the cage very often because somebody's got an injury."
Gardner didn't register an official at-bat on Wednesday; he drew two walks, was hit by two pitches and scored two runs. Hafner was 0-for-2 with a flyout and a strikeout.
Neither injury is considered serious, but Girardi said he likely wouldn't know either player's status for Thursday's matinee against the Royals until before the game.
"It's hard to say," Girardi said. "I don't know. They'll probably both be a little sore tomorrow. We'll have to see."
Bryan Hoch is a reporter for MLB.com. Follow him on Twitter @bryanhoch and read his MLBlog, Bombers Beat. Josh Vitale is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.