The gravitational search algorithm (GSA) is a popular optimization method inspired by celestial interactions. And the MLGSA is an outstanding variant of GSA. To improve its performance, we propose the elite‐of‐the‐elites driven five‐layered gravitational search algorithm (EFGSA). EFGSA introduces a new population layer comprising elite individuals, improving the balance between exploration and exploitation. Experimental results on the 2017 IEEE Conference on Evolutionary Computation (CEC) benchmark functions demonstrate EFGSA's superiority over the MLGSA algorithm in terms of solution quality and convergence speed. The obtained results underscore the efficacy of EFGSA in addressing optimization problems. © 2023 Institute of Electrical Engineer of Japan and Wiley Periodicals LLC.