Gold is used to speed up your buildings / researches / missions, extend the building lists, restock your ressources, annex castles, temporarily boost your ressource production and recall your troops. You can buy gold in the shop, use the "Earn gold" function or watch videos.