Due to its unique characteristics, the gold price has a strong influence on almost all sectors. Professionals and scholars have devoted a great deal of attention to forecasting the gold price because of this reason. Using the robust model for the accurate prediction of gold prices, this paper examined the factors that affect IRAQ's gold prices. Using Bayesian Vector Autoregression and random forest models, significant associations were detected between dependent and independent variables over the course of a decade starting in 2013 and ending in 2023. Inflation, crude oil price, and exchange rate are three independent variables that influence gold prices. Crude oil prices are positively impacted by inflation and exchange rates, while gold prices are negatively impacted by inflation and exchange rates. In addition to academics and investors, the study results have practical applications. The Bayesian VAR and Random Forest models are used to analyze the gold price time series. To deliver correct predictions of experimental data, weights are assigned to the models. There are three types of errors to measure: root mean squared error, average error, and average percentage error.