Gravitational production of superheavy dark matter