There are many things that effect the price of gold but there are 3 which comprise the largest parts of it; Supply, demand and purchasing currency.
Supply and demand are easy to understand. The more demand there is on a product the more the cost of that item goes up. As the price goes up typically more sellers come into the mix and the supply comes to market. When one of these factors is out of balance everything else being equal the price will move.
Sometimes more complex for people to understand is how the price of gold goes up and down only because the currency it’s being represented in goes up and down. So if the value of the dollar goes down relative to other currencies and commodities, it takes more dollars to buy the same amount of gold; Hence an ounce of gold would be worth more dollars. Conversely if the value of a currency goes up, than it takes less units of that currency to buy the same amount of the commodity.