The French is Qu'ils mangent de la brioche (not gateau as one might expect). And Queen Marie-Antoinette did *not* say this. (When famine struck Paris, she actually took an active role in relieving it.) Jean-Jacques Rousseau attributed the words to "a great princess" in book 6 of his Confessions. Confessions was published posthumously, but book 6 was written 2 or 3 years before Marie-Antoinette arrived in France in 1770.
John Wexler writes: "French law obliged bakers to sell certain standard varieties of loaf at fixed weights and prices. (It still does, which explains why the most expensive patisserie will sell you a baguette for the same price as a supermarket.) At the time when this quotation originated, the law also obliged the baker to sell a fancier loaf for the price of the cheap one when the cheap ones were all gone. This was to forestall the obvious trick of baking just a few standard loaves, so that one could make more profit by using the rest of the flour for price-unregulated loaves. So whoever it was who said Qu'ils mangent de la brioche, she (or he) was not being wholly flippant. The idea was that the bread shortage could be alleviated if the law was enforced against profiteering bakers. I have seen this explanation quoted in defence of Marie Antoinette. It seems a pity, after all that, if she didn't say it."
Gregory Titelman, in Random House Dictionary of Popular Proverbs & Sayings (1996), writes: "Zhu Muzhi [head of the official Chinese Human Rights Study Society in the People's Republic of China] traces it to an ancient Chinese emperor who, being told that his subjects didn't have enough rice to eat, replied, 'Why don't they eat meat?'"