Make sure you are hydrating a LOT at the gym and in the hour or two before going (well, ideally all day long, but you get my point). Dehydration can cause fatigue. I notice if I'm well hydrated my workouts go very well, if I'm even a little dehydrated they do not go well.
Mids09: Do you drink drinks like gatorade? You need to keep your electrolytes up as well as keep your blood sugars stable. When you exercise your blood sugar goes up and then your body will correct itself within a couple of hours. Exercise is a natural insulin. Have your blood sugars tested to make sure you're not hypoglycemic.
The solution to your problem may be as simple as going to the gym at a different time. But the basic rule is to have a workout at least 1 hour after you had your meal. Also drink water while you exercise. Interesting thing I've noticed: I was filling out of energy prior to a weight workout. So instead I've turned to a boxing bag. After 10 minutes, my energy level rise up and I had a pretty good weight workout.