This study presents a gravitational search algorithm (GSA) for reactive power dispatch (RPD) problem. RPD is an optimisation problem that decreases grid congestion with one or more objective of minimising the active power loss for a fixed economic power schedule. The proposed algorithm is used to find the settings of control variables such as generator terminal voltages, transformer tap settings and reactive power output of the compensating devices, in order to active power losses minimisation in the transmission system. In this study, GSA is examined and tested on the standard IEEE 30-bus, 57-bus and 118-bus test systems with different test cases such as minimisation of active power losses, improvement of voltage profile and enhancement of voltage stability. To show the proposed algorithm of effectiveness and the obtained results are compared with those reported in the literature. Simulation results demonstrate the superiority and accuracy of the proposed algorithm, and considering the quality of the solution obtained, the proposed algorithm seems to be effective and robust to solve the RPD problem.