Even in the case of food, though, the value is determined by people's want/need, not anything inherent in the object itself. To a starving man, food is likely more important than anything in the world to him. Therefore, the value is much higher than gold. On the other hand, your typical first worlder could probably skip a meal with no real issues. It is a much lower value to him. A suicidal man may even find food worthless.
Gold has emerged over thousands of years a good medium of exchange due to many people wanting something they could trade easily for other goods. Gold fit the bill. It may happen that we find another object in the future that meets people's demands for money even better than gold, in which case we would probably see the price of gold go way down and this other element increase in price until it found a relatively stable value compared to the people's demand for it.