In this article, an intelligent method to detect, locate and quantify structural damages is presented via an optimization model. To predict the damage location and severity, the theory of pseudo-residual force vector (RFV) is applied. The proposed method can identify damages based on only a few mode shapes of the structure that can be easily obtained by a dynamic test. The objective function is defined as a minimum difference between the numerical and experimental variables in the RFV and the gravitational search algorithm is employed as a meta-heuristic technique for solving this optimization problem. The efficiency of the proposed method is investigated through the numerical examples with different damage scenarios. In the examples, the experimental data were simulated numerically using a finite element model of the structure and as demonstrated, it is possible to identify the damages with a reasonable level of accuracy while considering noise effects.