Gold is a precious metal with high resale value, often considered a safe investment as its price typically rises with inflation, attracting investors. However, even slight changes in gold prices can have significant impacts. To build an accurate forecasting model, this study applies and compares Gated Recurrent Unit (GRU), Bidirectional Gated Recurrent Unit (Bi-GRU), Long Short-Term Memory (LSTM), and Bidirectional Long Short-Term Memory (Bi-LSTM) algorithms on global gold prices. GRU and LSTM are recurrent neural networks designed to capture patterns in sequential data, where GRU uses a simplified gating mechanism to retain essential information, and LSTM, with its more complex gates, helps manage long-term dependencies in data. Bi-GRU and Bi-LSTM process data bidirectionally, capturing context from both past and future sequences for better prediction accuracy. This research uses data from Yahoo Finance (01-01-2014 to 12-06-2024) and experiments with optimization techniques (Adam, AdamW, Adamax, and Nadam), batch sizes (8, 16, and 32), time steps (10, 20, and 30), and a learning rate of 0.0001, trained for 1000 epochs with checkpoints and early stopping. Bi-GRU with Nadam, batch size 8, and 20 time steps proved most effective, with MSE of 4.1153, RMSE of 2.0286, MAE of 1.5881, and MAPE of 0.8857%. Forecasts using this model predict a 20-day decline in gold prices.