We consider the resonant interaction energy and force between two identical atoms, one in an excited state and the other in the ground state, placed inside a photonic crystal. The atoms, having the same orientation of their dipole moment, are supposed prepared in their symmetrical state and interact with the quantum electromagnetic field. We consider two specific models of photonic crystals: a one-dimensional model and an isotropic model. We show that in both cases the resonant interatomic force can be strongly enhanced by the presence of the photonic crystal, as a consequence of the modified dispersion relation and density of states, in particular if the transition frequency of the atoms is close to the edge of a photonic gap. Differences between the two models considered of photonic crystal are discussed in detail, as well as comparison with the analogous system of two impurity atoms in a quantum semiconductor wire. A numerical estimate of the effect in a realistic situation is also discussed.