Keep in mind currency is only as valuable as the confidence behind it, so backing currency with gold says "hey, if you want to, you can turn this in for gold, so believe me, you can trust it."
How did gold become the standard:
1) It's rare, not easy to acquire. Figures of over 70 tons or raw ore to process resulting in one ounce are not unheard of, and less than 5 tons to gain an ounce is considered very rich ore.
2) People agree that it is attractive.
3) It is VERY useful for plating, designing, decorating, you can flatten gold so thin that a one inch square of it can easily float in the air and take a long time to land. Which means you can convert it into jewelry, gold plated items, which people find attractive and they want it.
4) It has many uses in manufacturing.
Edit: 5) it's very compact, dense, easy to transport and hold.
No country in the world uses gold to back their currencies anymore. All world currencies are fiat currencies currently meaning they are only backed by governmental power.
Gold has always been a useful metal, it doesn't corrode, it's soft, and it looks nice. There has always been demand for it because of that.
It use to be used to back money because there was significant demand (giving it value), and it was sufficiently difficult to obtain its price remained high. In effect, the first anti-foraging measure was simply to pick something difficult to obtain, so gold coins couldn't be forged (it would require mining and refining gold, a process so difficult that you wasted enough time to to equal the value of gold you go). It's not like modern coins that cost just a few cents to make and have a face value far higher. That kind of anti-forgery effect is really what drove gold to be the standard for money.
Now we have floating currencies. It's backed by the goverment (they simply say if you have the cash I'll pay), and it's value is controlled by adjusting how banks (especially the central bank) deal with loans (specifically, when you deposit money into a bank, the bank can loan it to someone else while keeping it in your account, this creates money since you both have the money). Governments also issue bonds which can have some effect as well (they take money from the people and spend it, and pay them back with interest later)
Did ye ferget ta search?
It's a VERY common question here, matey.