Before going to the gym...
If you are hungry, by all means eat something before going to the gym.
However, your liver normally carries enough glycogen to fuel fairly intense physical activity for about an hour and a half--so unless your workout lasts longer than that, you should be fine. I might take a small snack with you to eat at the gym in case you feel light-headed, but otherwise you should be pretty safe.
I eat yogurt or a protein shake or cottage cheese&fruit, something small, one hour before my workouts, which are strenuous. When i haven't done that, or hadn't drunk enough water during the day,, I can really tell, but that's just me. Try it out, see how you feel and adjust as needed. Even if i'm not working out, i still eat planned snacks three times a day so am used to a mid-afternoon cheesestick anyhow.
Also, after working out, i drink a protein drink or take a banana from the training studio. Again, see how you feel and make adjustments.
The worst thing that'll happen is you'll feel tired/weak/grumpy/fussy, so no big deal. Adjust as necessary :)
Good luck! let us know how it goes!