The X-ray phase imaging apparatus is configured to include an image generation unit that generates an X-ray phase-contrast image based on a phase-contrast between a step curve representing an intensity change of an X-ray when an object is placed between an X-ray source and a phase grating or between a phase grating and an absorption grating and a step curve when no object is placed therebetween, and is configured to obtain a displacement amount of relative positions of a plurality of gratings based on a plurality of step curves.