Gold tends to shine during periods of high inflation, but it’s important to weigh all the factors before investing.