Why does a gold leaf appear blue if made very thin?

If the gold leaf is thin enough it will allow light to pass through it. Gold reflects the yellow end of the spectrum, which means the blue end of the spectrum is not reflected and can pass through the thin gold leaf. So if you view the gold leaf with transmitted light it will appear blue. In reflected light it still appears gold even when only 25nm thick - I speak from experience having made gold films that thin.

Response to comment:

Gold has a relative density of 19.3, so 1g of gold has a volume of about $5 \times 10^{-8}$m$^3$. If you spread this out in a film of 50m$^2$ then the thickness of the film is about 10nm.

The point is whether this is thin enough for light to pass through. If the film is too thick for any transmitted light to penetrate then it should just look gold. If the film has such a high transmission that all light gets through then in transmitted light it won't have any particular colour. For the film to look blue it must allow significant blue light through but block yellow light.

Annoyingly my Googling failed to find values for the optical absorptance of gold. Or rather no freely available data - there are lots of papers behind paywalls. However I did find this graph of the optical transmission at 497nm (blue green light):

Optical transmission

The dashed line is the transmission, and from the graph a 10nm film has an optical transmission of a shade under 70%. That looks just right to make the film look blue green in transmitted light.

To add a little fun experimental background to John Rennie's answer: the reason (as in John's answer) is the same reason that dichroic filters are the opposite color in transmission and reflexion.

Alternatively, make a strong solution (about 100 to 500 milligrams in a liter of water) of sodium fluorescein: it's green in transmission and brown in reflexion.

Better still, show a bunch of curious children the red fluorescein powder and ask them to foretell what color it will be in water. Then do the experiment and watch their reaction - you'll need to be willing to answer many questions, though.

It's probably best to do this as a demonstration and not let the children touch the powder / water. Sodium Fluorescein is very safe, but it unfortunately does have a probability of the order of $10^{-4}$ (depending on how much and how it is ingested) of provoking anaphylactic shock (you'd be unlucky, but best to be safe).