CHICAGO — It’s not often a team gets two chances to turn a late-game double play in the same inning.

So when the Yankees failed to convert both of those chances in the seventh last night against the White Sox at U.S. Cellular Field, you got the feeling their leaky defense was going to cost them.

Then, down to their last out, the Yankees watched Nick Swisher hit a ninth-inning homer that tied the score against his former team and pumped life into a lineup that was dominated by Gavin Floyd.

However, the jolt provided by Swisher’s clutch homer was short-lived as DeWayne Wise’s ninth-inning single to center off Phil Coke scored Scott Podsednik from second with the winning run in a 3-2 White Sox victory in front of 31,305.

The game was delayed 64 minutes at the start due to rain. Perhaps that affected the Yankees bats as they fanned 14 times.

Phil Hughes, who replaced Andy Pettitte in the seventh and worked two innings, was the loser and is 4-3. It was the first time in Hughes last 17 relief appearances he allowed a run. And that run scored after he left the game.

But it was the shoddy defense that hurt as much as Hughes and Coke combining to give up the run in the ninth.

“It’s going to happen some times,” Hughes said of second baseman Robinson Cano’s errant pivot throw that glanced off Mark Teixeira’s glove and allowed Jim Thome to score from second to give the White Sox a 2-1 lead in the seventh. “Robinson makes that play all the time.”

A.J. Pierzynski was bearing down on him, but Cano said the sliding catcher never got a piece of him. Instead, Cano only got four fingers on the ball.

“He was on top of me, but if I get a good grip I make a good throw,” Cano said. “I threw it with four fingers.”

Earlier in the inning, Alex Rodriguez failed to field Pierzynski’s one-out grounder with a half-dive that would have been a double play if made cleanly. It was originally scored an error but quickly changed to a hit.

Combined with the Red Sox beating the A’s, the loss sliced the Yankees AL East lead to 2½ games.

Pettitte, who helped contribute to the sloppy seventh by falling down while fielding Thome’s slow roller near the first base line leading off the inning, is tired of working in games the Yankees don’t win.

“It’s like a rerun every start, said Pettitte,” who hasn’t won since July 1, and the Yankees are 1-4 in his last five outings. “I am feeling great and its frustrating not getting the team a ‘W.’ ”

In 6 1/3 innings, Pettitte gave up two runs (one earned) and five hits.

Leaky defense wasn’t the only problem because Floyd dominated. In 7 2/3 innings, he gave up a run, four hits and fanned 10. Thornton added four strikeouts. Eight of the 14 whiffs were looking.

Swisher, who was obtained from the White Sox in the offseason for Wilson Betemit, admitted being too pumped against his former club early.

“I wanted to do something too bad,” Swisher said of his first three at-bats, in which he fanned three times; twice looking.

As for the homer, he didn’t have much of a plan against the gas-throwing Thornton.

“He throws about 120 mph, I just wanted to get the barrel of the bat on it,” Swisher said.

He did, and for a moment it appeared the Yankees were going to steal a victory.