I'm not sure how you reached this conclusion. I did as you suggested. $100 invested 50 years ago into gold would be worth $3000 today. $100 invested into the S&P500 50 years ago would be worth $6870.
https://www.macrotrends.net/2324/sp-500-historical-chart-dat... https://www.macrotrends.net/1333/historical-gold-prices-100-...