As far as I know, there's no automatic way to centre the grid, since it would depend on the size of the grid, and the size of the canvas. I suppose one could write or find a script/extension for this, but I don't know of one. However, it's easy enough to work out the required offset using some simple arithmetic
For the sake of an example, suppose you have a square grid that is 45px, and a canvas size that's 1920px wide. Note that you can find out the canvas size of your document by clicking Image > Canvas Size.
- 1920/45=42.666 - so that's 42 grid squares, with the remainder being 0.666
- 0.666*45 = 29.97, rounding up to the nearest pixel gives 30px
- The horizontal offset you need is therefore 30/2 = 15px
You could also do the same calculations for the height of the canvas to work out the required vertical offset if you also need it centred vertically.