A couple brought a smoke machine to El Ranch Dorado Park, just east of Los Angeles, on Saturday, to reveal whether their new baby is a boy or a girl.
A member of their party filmed the moment the machine was set off, with onlookers expecting blue or pink plumes.
Instead the device quickly ignited 4ft grass, with low humidity and a persistent breeze offering perfect conditions for the fire to spread.
Surveillance footage showed the couple frantically race to their car to grab water bottles in a bid to extinguish the flames.
But their attempts were futile and they were soon forced to call the emergency services.
“You can’t fight a fire like this with a water bottle,” said Captain Bennet Milloy of the California Department of Forestry and Fire Protection.
“They had no chance after it started.”
Firefighters arrived within minutes and the couple told them what happened.
“It’s a pretty tragic situation,” Mr Milloy added. “Obviously this was supposed to be a happy event.
The couple could be liable for the cost of fighting the fire and face prosecution.
The ensuing blaze prompted evacuations in parts of Yucaipa, a city of 54,000 people, and the surrounding area.
Helicopters were brought in to drop water across the landscape but by Monday, the fire had torn across more than 7,300 acres (11.5 square miles)
Mr Milloy said some devices used to reveal genders are harmless but others contain chemicals that produce heat and can spark fires.
He said the device will be tested to determine what it contained. He did not know which colour smoke it had been intended to emit.
Wildfires have now burnt through more than two million acres in California this year – setting a new record.
The previous record was 1.96 million acres (793,184 hectares) burnt in 2018.
Dry, hot winds are predicted to raise fire danger to critical levels in the coming days.