The 1944 work by Australian artist Herbert Badham shows US soldiers and locals at a 24-hour eatery.
Crucially it shows a black American GI with a female civilian.
An arts committee ruled that the painting's new owner, who wanted to hang it in his London home, cannot remove it from Australia.
The owner bought the painting at auction in Melbourne last year for A$465,000 (£265,000; $350,000).
After initial permission to export the painting was blocked, he took it to an appeals tribunal, where art experts debated the merits of the work.
In its judgement, the tribunal found that the painting showed a critical stage in Australia's history - during wartime and its development as a multicultural nation.
"The subject matter, which graphically records the interaction of different races, associating in congenial circumstances at a time of great danger for Australia is deeply impressive," it said.