Optimization problems are prevalent in a variety of real-world applications, including medical, engineering, chemical, and others, and must be precisely solved to enhance the performance of these applications. Unfortunately, finding near-optimal solutions to these problems is regarded as a hard challenge due to their various characteristics. In a new attempt to solve these problems, this paper presents a new variant of the artificial gorilla troops optimizer (GTO) called ranking-based GTO (RGTO). This variant uses two strategies known as the ranking-based update strategy and the convergence acceleration strategy to improve both the classical GTO's exploitation and exploration capabilities. The first strategy is proposed to enhance each gorilla's local and global search abilities, whereas the latter is intended to enhance GTO's global search abilities to reach better solutions as quickly as possible. First, a recent and challenging benchmark, namely CEC-2017, is utilized to assess the RGTO's explorative and exploitative capabilities. After that, RGTO is used to solve three engineering optimization problems, including parameter estimation problems for both photovoltaic (PV) models and proton exchange membrane fuel cells (PEMFCs), as well as some engineering design problems, to demonstrate how well it performs for real-world optimization problems. Compared to several rival optimizers, the proposed algorithm provides outstanding outcomes for the three engineering optimization benchmark problems considered.