The car veered into the Serves You Right Cafe in Ravenshoe, a small town some 1,710 kilometres (1,060 miles) north of Queensland state's capital Brisbane, around midday (local time), a police spokesman told AFP.
"As a result of that crash, a gas bottle has ignited and subsequently the building caught alight," he said.
A Queensland Ambulance Service spokeswoman said 18 people were being treated for injuries, with three of them critically hurt. They were being flown to nearby hospitals.
An ambulance spokesman earlier said most of the injuries were believed to be burns-related from a blaze that took an hour to extinguish.
More From This Section
Two helicopters and a Royal Flying Doctor plane, an aero-medical service covering regional and remote areas, were sent to the site of the crash, which a witness described as "absolute mayhem".
"He hit the gas bottle on the side," the witness, who was not named, told the Cairns Post newspaper, referring to the car's driver.
Another witness told the newspaper "the whole town felt it", referring to the explosion.
"One old lady had her clothes burnt off her," she added.
Ken Hodge told the Australian Broadcasting Corporation he saw two cars collide on the street outside the cafe with one becoming airborne, smashing into the eatery.
"It's pandemonium in the middle of Ravenshoe, quite a large number of people there wrapped in blankets," he said of the close-knit town with a population of less than 1,000.