Landon Donovan scored early in the second half, and Michael Bradley tied it in the 82nd minute Friday to keep alive the Americans' chances of advancing. Those chances would have been much greater had Maurice Edu's goal off a free kick not been disallowed by the referee.
"I'm a little gutted to be honest," Donovan said. "I don't know how they stole that last goal from us. I'm not sure what the call was. He (the referee) wouldn't tell us what the call was."
Second-half sub Edu appeared to put the U.S. ahead in the 86th minute, poking in a close-range shot after Jozy Altidore headed Donovan's free kick to him. But the goal was waved off by referee Koman Couilibaly of Mali, apparently for a foul before Edu got the ball.
"We asked the ref many times what it was or who it was on and he wouldn't or couldn't explain it," Donovan said. "I don't know what to think of the call because I didn't see any foul, just a normal free kick and a goal."
Slovenia, the smallest of the 32 nations in the tournament, took a 2-0 lead when Valter Birsa caught goalkeeper Tim Howard flat-footed to score in the 13th minute and Zlatan Ljubijankic scored on a counterattack in the 42nd.
Donovan scored in the 48th minute and Michael Bradley, son of U.S. coach Bob Bradley, tied the score in the 82nd.
"My guess is there's not many teams in this tournament that could have done what we did," Donovan said.
Bradley scored when Jozy Altidore's header fell in the middle of the penalty area. Running at full speed, Bradley caught up to it just in front of the net and tapped it over Slovenia goalkeeper Samir Handanovic's head.
"This team still understands how to fight for 90 minutes," the U.S. coach said. "This is something we've seen time and time again."
The United States never has won a World Cup game in which it has trailed.
Slovenia (1-0-1) leads Group C with four points and would have qualified for the second round with a win.
"We lost our concentration in the second half and the Americans benefited from that," Slovenia coach Matjaz Kek said. "We were ahead of the United States but we didn't overcome this pressure."
The U.S. (0-0-2) is second with two points, followed by England (0-0-1) with one point, pending its match against Algeria (0-1) in Cape Town later Friday. The top two teams in the group advance.
"We know we're good enough to play against a team like that," Donovan said. "We can't keep putting ourselves in holes like that. We've got one more chance against Algeria, and we're still alive." A pro-U.S. crowd dressed in red, white and blue came to cheer the Americans, who entered with an 0-5 record against Eastern European nations in World Cup play.
It was a blustery 55 degrees at gametime in Ellis Park, where the U.S. lost to Brazil 3-2 in last June's Confederations Cup final after taking a two-goal lead into halftime.
Slovenia had two shots on goal in the first half and scored on both.
Birsa put the Green Dragons ahead when the American defense gave him yards of space. His left-footed shot from 30 yards went in without any attempt to stop it by Howard, who froze and may have been screened.
Jose Torres, who replaced Ricardo Clark in the one change among American starters, nearly tied it in the 37th minute with a free kick from the side of the penalty area that was parried out of play by Handanovic.
Robbie Findley got a yellow card in the 40th minute for a hand ball in Slovenia's penalty area, an automatic suspension for the Algeria match because he also was cautioned against England.
The U.S. nearly tied it a minute later when Clint Dempsey crossed toward Donovan inside the 6-yard box. But as Donovan was about to redirect the ball in, Miso Brecko slid in and knocked the ball away. Donovan skidded into the goal without the ball, and several American players put their hands on their heads in frustration.
Slovenia quickly countered, Ljubijankic got behind Jay DeMerit to come in alone on Howard and slid the ball under the goalkeeper.
Benny Feilhaber and Maurice Edu entered at the start of the second half for Findley and Torres, with Dempsey pushing up to forward. The U.S. quickly got a goal back.
Donovan took a pass down the right flank from Steve Cherundolo, patiently took three touches and from an extreme close-in angle put the ball over Handanovic into the roof of the net. With his 43rd goal, Donovan extended his American scoring record.
Donovan's 22-yard free kick in the 70th bounced off the wall into the middle, but Altidore's 12-yard shot went right at Handanovic.