When a player wants to play a game, he /she has to put their gold at stake. The stake can be of a variety of available amounts based on the type of variation. 

If you defeat your opponent, then you get his / her gold (in 2-player matches). In the case of 4 players, you get gold of 2 players. If you run out of gold due to loss, then you can open MAGIC PICK or watch VIDEO ADS or by winning matches and opening the Chest and by participating in events to get more gold.

If you have run out of ads and already opened the magic chest for free gold, then the only option is to buy the gold.