This paper presents a novel closed-loop frequency control algorithm that captures the resonant frequency of a Wireless Power Transfer (WPT) system to obtain high-efficiency at maximum power transfer in moving electric vehicles. The control algorithm of the WPT system is designed regarding the WPT has magnetically coupled series-series resonant circuit topology. The study mainly focuses on catching the resonant frequency depending on the changes in air gap, load, and inductance. The proposed algorithm is able to detect the resonant frequencies, allowing the maximum power transfer under inductive, ohmic, or capacitive behaviour of the system. Simple, fast and cheap structure of the algorithm renders obtaining the resonant frequency in a wide frequency range. Moreover, once the resonant frequency of the inverter is obtained, switching loss is minimized by leveraging Zero Current Switching (ZCS). The numerical simulations of the control algorithm are performed in MATLAB/Simulink. Furthermore, a Finite Element Method (FEM) analysis is conducted by utilizing co-simulation of Ansys Maxwell 3D -Simplorer -MATLAB/Simulink. Finally, the developed system is experimentally tested for several air gap values and it is verified that the system is able to operate with high efficiency for the distances less than the critical air gap.