Set clear fitness goals. If you go to the gym without any clear direction, finding sharp focus during your workouts will be difficult. Write down overall goals, then break down each big goal into smaller, short-term goals. Set a goal for every workout that will help you reach your short-term goals. For example, if your big goal is to lose 10 pounds, you may have a weekly short-term goal of a 2-pound weight loss. Focus on that goal during every workout. This way, running on the treadmill doesn't become a mindless activity -- rather, it's a pointed, purposeful exercise that will propel you toward your short and long-term goals. If you start to lose concentration, envision yourself having already accomplished these goals.
Minimize distractions. Control your external environment as much as possible by eliminating things that may cause you to lose focus. For example, leave your cell phone in your gym bag if it's likely to interrupt your exercise. Or if you have a chatty training buddy, explain to him or her that you'd like to save your conversations for after the workout so you can concentrate. If you find that other people tend to interrupt your workouts when you're at the gym, wear a baseball hat and plug into your headphones to politely send out a message that you'd like to be left alone.
Pump up the volume. Many people find listening to music to be helpful for improving workout focus. Use music with a strong, fast tempo or powerful, motivating lyrics to keep your mind primed when you're training.
Time your training right. Not everyone likes to train at 5 a.m., and not all people are night owls. Instead of trying to force yourself to exercise at certain times, try to adjust your schedule to fit in exercise when you are naturally most motivated. If you're the type that gleefully hops out of bed in the morning, schedule exercise then. If you are more energized in the afternoon, sneak in a workout during your lunch hour.
Use a mantra when you start to lose focus. Mantras can be a great way to snap your mind back on track if you begin to zone out. A mantra is a word or phrase you repeat to yourself to align and focus your mind. Mantras like "every minute counts" or "remember why I'm here" can help harness a wandering mind at the gym.