I've never used it before, so I did some googling, and these were helpful:
Anesthetize Fish?
This references koi (which are obviously much bigger than your goby), but perhaps you can look for the same behavioral signals to know when it's okay to handle the fish.