The extended finite element method (XFEM) can make the characterization of discontinuous displacement field independent of cell boundaries by enriching discontinuous displacement mode on the influence domain of related nodes. Therefore XFEM possesses the capacity of effective describing the crack propagation in concrete. The damaged process and failure mode of Koyna gravity dam subjected to earthquake was analyzed using XFEM. The computed distribution of cracking damage is consistent with the actual condtion and the model test results in literature, which verifies the validity of the calculation model. Considering the spectral characteristics of ground motion, we conducted numerical simulation of the dynamic damaged process of a concrete gravity dam based on a reasonable seismic wave. The potential failure mode of the dam under strong earthquake ground motion was generalized from the simulation results. Our work can provides the basis for the seismic design, construction safety hazard rate analysis under particular failure mode and flood routing.