Golden Keys are used to purchase specialization buildings.
They can be obtained by casting off cargo ships, fixing disasters, competing in the Contest of Mayors, popping opinion bubbles, or by watching advertisements. You can also buy them with SimCash, 100 SimCash a piece, but with a discount for buying multiple keys at once which is (K * (K-50))* 3 1/3