It was 4-all when the Dodgers turned their first triple play since June 13, 1998, against Colorado.
Chris Denorfia led off with a single against Javy Guerra (1-0) and Headley walked. Jesus Guzman squared to bunt, but the pitch came high and tight and hit his bat as he backed away.
The ball landed in front of the plate and catcher A.J. Ellis alertly picked it up and threw to third.
"I was very confident I heard it hit the bat. I didn't hear anything from the umpire behind me," he said.
Guzman, startled by what happened, didn't run to first base, which made it easy for third baseman Juan Uribe to relay to shortstop Gordon at second base. In turn, he threw to James Loney to complete the triple play.
"As soon as I got the ball to Juan and nobody was running I said, 'This is going to be a triple play,'" Ellis said. "They were sure it was a foul ball and we were sure it was a bunted ball."
Padres manager Bud Black came out to argue with plate umpire and crew chief Dale Scott, who ejected him.
"It happened so fast," said Black, who thought he heard two sounds when the ball hit the bat. "It sounded funny."
He came into the clubhouse and watched a replay.
"There's not many times where a ball headed for the face turns into a triple play," Black said. "I looked at the take, and it was a fair ball."
Headley saw Scott's hands go up and believed the umpire was signaling that the ball hit the bat, then hit him in the batter's box, making it a foul ball.
"When he throws his hands up like that, it's supposed to be a foul ball. I told him that five times. He said that he was just trying to get out of the way," Headley said. "He wasn't just sticking his hands up. He waved them, and to me, that means foul ball, regardless of whether it hit him or didn't hit him. That's irrelevant."
Scott told a pool reporter that the umpiring crew didn't see the ball hit the batter.
"It was off the bat and then straight down," he said. "We saw several angles, including the replay here and we also called in and asked for the replay from New York and looked at that. The ball went straight down and I thought it hit the bat. I heard bat.
"I moved out of the way of the catcher, and now all of sudden, I have two bodies in front of me. I didn't see where the ball was. I saw it trickle in front of the plate. Without having seen it hit, I have to assume that's a fair ball."
First base umpire Bill Miller confirmed that the ball was momentarily foul before it rolled fair again.
Scott said as long as the ball isn't touched it's fair.
"There was nothing verbal (from the umpire), so I just picked it up and started throwing," Ellis said. "You keep playing and don't assume anything."
The Dodgers improved to 9-1, the best mark in the major leagues and equaling their best start since opening the 1981 season with the same record.
Kemp hit his fourth homer in three games as the Dodgers sent San Diego to its fourth loss in a row. The Dodgers won the series opener Friday night when the winning run was forced in on a bases-loaded walk.
"I'm proud of my guys," he said. "We're finding ways to win. Whatever it is, we're getting it done."
The Dodgers had the same situation in the bottom of the ninth with runners on first and second and nobody out, with Juan Uribe in a sacrifice situation against Brad Brach (0-1). Uribe successfully got the bunt down and Ellis was intentionally walked to load the bases.
Pinch-hitter Jerry Hairston Jr. fouled out before Gordon slapped an 0-2 pitch to left field, setting off a wild celebration between first and second base. Gordon had struck out with the bases loaded to end the seventh and earlier committed an error.
"I shouldn't have put (Clayton) Kershaw in the spot. That's on me," Gordon said. "I was glad I could come through for him."
A joyous Kemp tackled Gordon, leading to a dog pile of players.
"I had to get my licks in," Kemp said.
The Dodgers gave Kershaw to a 4-1 lead. But Josh Lindblom gave up a tying two-run single to pinch-hitter Jeremy Hermida in the sixth, leaving last year's NL Cy Young winner with his third no-decision in as many starts.
The Dodgers improved to 6-0 at home with their ninth straight win against San Diego at Dodger Stadium.
San Diego tied it at 4 with three runs in the sixth. Orlando Hudson had a bases-loaded RBI single through the hole past Gordon to finish Kershaw, and Hermida hit a bases-loaded single.
Kershaw allowed four runs — three earned — and eight hits in 5 1-3 innings, struck out three and walked three. The left-hander's three earned runs were the most he's allowed since last Aug. 7, a span of 11 starts.
"We were just a little bit off the rhythm and timing," Ellis said. "He'll bounce back and be ready to go."
Padres starter Edinson Volquez gave up four runs and six hits in five innings. He struck out two and walked five.
NOTES: The Dodgers swept a six-game homestand for the first time since the opening homestand of the 2009 season, when they swept the Giants and Rockies in six games. ... Volquez hasn't reached the sixth inning in either of his two starts against the Dodgers this season. .. Padres C Nick Hundley snapped an 0-for-21 skid with a single in the third. His drought was the longest to start a season by a Padres non-pitcher since Ozzie Smith's club record 0-for-32 stretch in 1979. ... Hall of Fame broadcaster Vin Scully returned to the booth after missing five days with a bad cold. "I'm just going to give thanks that I'm here," the 84-year-old said. ... Los Angeles Clippers star Chris Paul took his 2-year-old son to the youngster's first major league game.