In this work, the structural response of a carbon nanotube based nanoactuator under a parallel-plates electrostatic actuation is investigated assuming a strain gradient theory. The sixth-order partial differential equation governing the mode shapes and natural frequencies of beam using Euler-Bernoulli and strain gradient theories are derived. A Galerkin decomposition technique is utilized to convert the partial differential equation to ordinary differential equations representing the system mode shapes. The proposed approach is verified by comparing it to previously published works. The main advantage of the proposed technique based on the Galerkin method is its simplicity and also its low computational cost in analyzing the response of a carbon nanotube based actuator under the effect of initial curvature, size-dependent parameters, and any actuating loads. Additionally, the influences of the axial forces that may arise from any thermal effects were taken into consideration in the derived model. The results obtained based on strain gradient theory, are compared with the classical continuum theory. It is shown that the strain gradient theory leads to higher frequency in comparison with the classical one.