This isn’t actually true. In the US, housing has outpaced the value of gold.
In 2023, you would need 254.7 ounces of gold to buy a house, since $495,100 avg home / $1,943 price of gold = 254.7
In 1920, you would need 164.1 ounces of gold to buy a house, since $3,395 avg home / $20.67 price of gold = 164.1.