There's no exact time, only a rough prediction/possibility.
Bitcoin will overtake gold, and it could happen as soon as the next bull run, Binance founder Changpeng Zhao told a conference audience in Hong Kong on Thursday.
Precisely, he said, "In the next bull run, it could happen."
Here is the top market cap of all assets, including public companies, precious metals, cryptocurrencies, and ETFs [1].

Based on this data, BTC market cap needs to grow about 1,900% to reach the same level as gold's market cap.
Here is the CAGR of BTC by BTC Oak [2].

Let's use the highest, the 10 year CAGR, 61.1%.
2026: $1.566T
2027: $2.523T (+61.1%)
2028: $4.064T (+61.1%)
...
2032: $27.371T (+61.1%)
2033: $44.095T (+61.1%)
With this calculation, BTC's market cap could overtake gold's market cap sometime between 2032 and 2033.
One other important thing is that BTC's CAGR will probably be much lower than that. The bigger the market cap, the more difficult it is to achieve higher growth. For example, big institutions like VanEck predict that the base case CAGR of BTC would be 15% until 2050, with the bull case CAGR around 29% [3].

Other sources predict the CAGR would be 10 to 30%. For the calculation, let's use 15%.
2026: $1.566T
2027: $1.801T (+15%)
2028: $2.071T (+15%)
...
2047: $29.475T (+15%)
2048: $33.896T (+15%)
With this calculation, BTC's market cap could overtake gold's market cap sometime between 2047 and 2048.
Please note that these calculations also assume that gold's market cap would stay the same, which is unlikely to happen.
Source:[1]
https://companiesmarketcap.com/assets-by-market-cap/[2]
https://btcoak.com/rolling-cagr[3]
https://www.vaneck.com/offshore/en/news-and-insights/blogs/digital-assets/matthew-sigel-vaneck-bitcoin-long-term-capital-market-assumptions