In this paper, gravitational search algorithm (GSA) is used for improving the control strategy of unified power quality conditioner (UPQC). The UPQC is considered with wind energy conversion system (WECS) and grid/load to determine the dynamic behaviors. The proposed control technique alleviates the power quality (PQ) problems in the WECS. Here, the GSA approach is used to identify the ideal solutions from the available search space and the method enables the UPQC to perform under different test conditions. Initially multiple parameters are considered such as, voltage, real and reactive power and current. Amid the load variations, the proposed method will regulate the power loss, and voltage instability problem. The proposed system is tested for different PQ issues. In order to evaluate the effectiveness of the proposed method, three different cases are considered they are performance of GSA under balanced condition, under unbalanced condition, under motor speed condition. The performance of the proposed GSA based UPQC system is validated through simulations using MATLAB/Simulink and compared with existing techniques such as FA, base model and ANFIS techniques. From the comparison analysis, we can infer that the proposed control technique is very much effective in enhancing the power quality of the system than the existing techniques.