Investing in gold has risks, but it can be a solid diversifier and a refuge in volatile or inflationary times.