The genetic algorithm method is combined with the finite-element method for the first time as an alternative method to invert gravity anomaly data for reconstructing the 3D density structure in the subsurface. The method provides a global search in the model space for all acceptable models. The computational efficiency is significantly improved by storing the coefficient matrix and using it in all forward calculations, then by dividing the region of interest into many subregions and applying parallel processing to the subregions. Central Taiwan, a geologically complex region, is used as an example to demonstrate the utility of the method. A crustal block 120 × 150 km2 in area and 34 km in thickness is represented by a finite-element model of 76 500 cubic elements, each 2 × 2 × 2 km3 in size. An initial density model is reconstructed from the regional 3D tomographic seismic velocity using an empirical relation between velocity and density. The difference between the calculated and the observed gravity anomaly (i.e., the residual anomaly) shows an elongated minimum of large magnitude that extends along the axis of the Taiwan mountain belt. Among the interpretive models tested, the best model shows a crustal root extending to depths of 50 to 60 km beneath the axis of the Western Central and Eastern Central Ranges with a density contrast of 400 or 500 kg/m3 across the Moho. Both predictions appear to be supported by independent seismological and laboratory evidence.