Wireless sensor networks (WSNs) have grown widely due to their application in various domains, such as surveillance, healthcare, telecommunication, etc. In WSNs, there is a necessity to design energy-efficient algorithms for different purposes. Load balancing of gateways in cluster-based WSNs is necessary to maximize the lifetime of a network. Shuffled frog leaping algorithm (SFLA) is a popular heuristic algorithm that incorporates a deterministic approach. Performance of any heuristic algorithm depends on its exploration and exploitation capability. The main contribution of this article is an enhanced SFLA with improved local search capability. Three strategies are tested to enhance the local search capability of SFLA to improve the load balancing of gateways in WSNs. The first proposed approach is deterministic in which the participation of the global best solution in information exchange is increased. The next two variations reduces the deterministic approach in the local search component of SFLA by introducing probability-based selection of frogs for information exchange. All three strategies improved the success of local search. Second contribution of article is increased lifetime of gateways in WSNs with a novel energy-biased load reduction phase introduced after the information exchange step. The proposed algorithm is tested with 15 datasets of varying areas of deployment, number of sensors and number of gateways. Proposed ESFLA-RW variation shows significant improvement over other variations in terms of successful local explorations, best fitness values, average fitness values and convergence rate for all datasets. Obtained results of proposed ESFLA-RW are significantly better in terms of network energy consumption, load balancing, first gateway die and network life. The proposed variations are tested to check the effect of various algorithm-specific parameters namely frog population size, probability of information exchange and probability of energy-biased load reduction phase. Higher population size and probabilities give better solutions and convergence rate.