If you mean like in this screen grab:
Then press Ctl+A to turn it on and off.
If you mean this (Rotate):

or this (Move):

then pressing Ctl+Q will turn them on or off - this also applies to the Scale Gizmo.
If you want to turn the Grid on or off then press Ctl+G.