Gold is widely regarded as a protective investment during periods of economic instability, yet its price movements are shaped by complex market forces, volatility regimes, and macroeconomic conditions. Forecasting gold prices therefore remains a challenging task in financial analytics. This study investigates gold price dynamics by applying ensemble machine learning models in combination with explainable artificial intelligence (XAI) techniques. The dataset comprises 2,511 daily observations from 2016–2026, enriched with engineered features including daily returns, short‑ to long‑term moving averages (MA20, MA50, MA200), rolling volatility, and trend distance indicators. A range of regression‑based models were evaluated, including Linear Regression, Decision Tree, Random Forest, HistGradientBoosting, XGBoost, LightGBM, Multilayer Perceptron (MLP), and Long Short‑Term Memory (LSTM). Performance was assessed using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R². Results indicate that Linear Regression achieved the lowest MAE (≈0.57), reflecting strong precision under linear assumptions, while ensemble models consistently demonstrated greater robustness and generalization in capturing non‑linear relationships. Deep learning models (MLP and LSTM) performed poorly under the chosen configuration. To enhance transparency, SHAP analysis identified closing price, short‑term volatility, and moving averages as dominant predictors, while LIME provided case‑specific explanations of individual forecasts. Overall, the integration of ensemble machine learning with XAI improved both predictive accuracy and interpretability, offering practical insights for financial forecasting, portfolio management, and risk assessment in commodity markets.