The official website for The Settlers of Catan

Question about The “Age of Darkness” Expansion Barbarian Attack - When a Barbarian Attack occurs, can I lose the gold stored in a Gold Cache?

Answer

Yes. The gold is only protected against Brigands - a barbarian horde searches until it finds what it is looking for. So, if you don't have other resources, the barbarians will steal up to 2 gold from your Cache.