World championship bronze medallists Jamaica had fancied their chances of ending America's dominance in the event, and looked devastated when Gonzales, who has struggled recently with a hamstring problem, stopped and sank to his knees in the third leg of the second heat.
Usain Bolt, the world's fastest man, had said on Wednesday there was a slim chance he might have run in the final for Jamaica.
"I feel sorry for him. I am not going to put him down or anything, he tried. I am still proud of him," team mate Errol Nolan said of Gonzales.
On a day of drama inside a boiling hot Olympic Stadium, there was also initial despair for South Africa and their double-amputee runner Oscar Pistorius, whose much anticipated relay run never materialised.
Pistorius, who races wearing carbon fibre prosthetic blades after being born without a fibula in both legs, had to watch in disbelief as his compatriot Ofentse Mogawane collided with Kenya's Vincent Mumo Kiilu on the last bend of the second leg and was too hurt to continue.
As Mogawane came around the last bend it appeared that Kiilu cut across him and caused the collision, sending both runners flying. Mogawane was left in a heap clutching his left shoulder and Kenya were later disqualified for the incident.
After an appeal the IAAF placed South Africa in the final.
"The Jury of Appeal met and agreed to advance the South African team to the final, even though they did not finish the race, considering that they had been severely damaged in the incident with Kenya," an IAAF statement read.
Jamaica's heat was won by Beijing silver medallists the Bahamas with a season's best of 2 minutes 58.87 seconds, nipping just in front of world champions and winners of the event at the last seven Olympics, the United States.
Joining them in Friday's final will be medal contenders Trinidad and Tobago and Britain, who finished first and second in the day's first heat, and Cuba, Belgium, Russia and Venezuela.
The Dominican Republic were also disqualified for a relay takeover outside the takeover zone during their second changeover and later had an appeal rejected.
The US, who set an Olympic record in Beijing of 2 minutes 55.39 seconds - the second fastest performance ever - were without injured 2008 Olympic 400m champion LaShawn Merritt, but still turned in a fast performance with Tony McQuay on form.
No American qualified for the men's 400m Olympic final in London, the first time that has happened.
Olympic hosts Britain looked quick with a season's best of 3:00.38, although Martyn Rooney apologised for slowing too early at the end having led the race.
"I want to apologise to my team mates. I eased up quite early and looked to one side so that was a rookie mistake - sorry about that, lads."
Russia's high jump world champion Anna Chicherova, the world leader with 2.03 metres, and defending champion Tia Hellebaut advanced to Saturday's women's final along with all the other likely medal contenders.
American Amy Acuff, competing at her fifth Olympics and hoping to improve on a best finish of fourth in 2004, failed to progress. Croatia's former world champion and 2008 silver medallist Blanka Vlasic is absent through injury.