Start a 3x3 pixel canvas, set the background to transparent.
zoom right in
using pen tool, colour the pixels using black in this pattern (below)
[x][ ][ ]
[x][ ][ ]
[x][x][x]
click edit > define pattern > 'name of pattern' > ok
open the image you want to add the grid to in photoshop
select the layer you wish to apply the pattern
click edit > fill > pattern > 'select your custom grid pattern' > ok
This is what I mean