The Rarity and Value of Gold?
Gold literally comes from the stars, being a product of the nucleosynthesis of supernovas, and the collision of neutron stars. The dust of gold gets scattered around the universe from these events, and came to Earth as part of the celestial dust that formed the planets of our solar system. Gold is stardust in the most literal sense.
Most of the gold on Earth sank to the core of the planet when Earth was formed. This means the majority of the gold we now mine came from later asteroid impacts; the stars were still delivering gold to Earth. Gold deposits that are mined today are found in the crust and mantle of the Earth, and contain gold brought to us from these celestial visits.
It is a limited availability metal. You don't find gold just anywhere. Even when you do find it, it is not always easy to reach; even our modern mining methods cannot extract some gold deposits from the Earth. When a gold deposit is mined dry, there is no more gold in that location, and a new one must be found. This makes gold relatively rare, because you don't find it just anywhere you look. That rarity adds to the value of gold for humans. When you find real gold, it is something special (and other people will probably want to get in on it, like with the California gold rush of the late 1800's).
The price of gold is based on its purity, with the most pure gold being the most expensive. However, the price of gold is constantly changing, based on the perceived value on the futures trading market. Futures traders determine throughout each trading day just how much they are willing to pay per gram for pure gold, and the value can change from minute to minute at times. This is known as price per gram, and is what gold sells for around the world.