We have developed a method for X-ray phase contrast imaging, which is based on a grating interferometer. The technique is capable of recording the phase shift of hard X-rays travelling through a sample, which greatly enhances the contrast of low absorbing specimen compared to conventional amplitude contrast images. Unlike other existing X-ray phase contrast imaging methods, the grating interferometer also works with incoherent radiation from a standard X-ray tube. The key components are three gratings with silicon and gold structures, which have dimensions in the micrometer range and high aspect ratios. The fabrication processes, which involve photolithography, anisotropic wet etching, and electroplating, are described in this article for each of the three gratings. An example of an X-ray phase contrast image acquired with the grating interferometer is given.