Evaluating the thermodynamic behavior of gold in the FeO-SiO2-CaO-Al2O3-MgO slag at 1773 K (1500 degrees C) helped to elucidate gold dissolution mechanism, which serves as a criterion for the recovery of gold in pyrometallurgical processing of gold-bearing materials. In this slag system, the solubility of gold decreases with higher Al2O3 content, while it increases with more FeO content. Consequently, gold dissolves in slag in a manner that shows a positive correlation with various basicity indices, such as the modified Vee ratio, (pct CaO + pct FeO)/(pct SiO2 + pct Al2O3), the activity of CaO and optical basicity of molten slag. A thermodynamic evaluation indicated the stabilization of gold in the form of the 'AuO-(Aurate)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\text{AuO}}<^>{-} \;(\text{Aurate})$$\end{document}' complex ion. Based on these findings, decreasing the basicity of the slag is recommended for improving gold recovery. However, reducing basicity leads to higher slag viscosity, which can potentially slow down the slag-metal reaction rate and the settling velocity of metallic droplets during the smelting process, thereby impeding gold recovery. Therefore, it is imperative to propose an optimal operating window that takes into account these physicochemical factors to maximize gold recovery during the smelting process of electronic wastes containing gold compounds.