In the first instance, the ownership passes to the personal representative of the estate to deal with it as part of the estate administration. If the deceased left a valid will which specifies who should receive the gold, it passes in accordance with the terms of the will. This also assumes that that the estate is solvent – i.e. there is enough money in the estate to pay the estate debts and liabilities. If not, then some/part of the gold/jewellery does not have to be sold to pay debts.
If there’s no will, the intestacy rules apply — meaning the closest family members (spouse, children, or parents) usually inherit. There are strict rules around who inherits under intestacy and is related to the value of the estate so in small estates, a spouse may inherit everything including jewellery and gold, even if children had been expected to inherit. Disputes also arise when gold is undocumented or was given away during lifetime.