1) Be real with yourself and find out why you are working out and what outcome/results you are striving for. It is hard to stay motivated toward a goal if you do not know what that goal is.
2) Get rid of negativity! The " I cant's ", "I'm tired", and " It hurts" will only hold you back and keep you from making progress. Think it terms of the positives of what will come about from you exercising. Visualize how good you will look and feel.
3) Know going into it that working is hard and will be painful sometimes. If you expect everything to be roses and a walk in the park then your wrong. This will be a tough journey, but this is what makes it badass the fact that not everyone has the strength and toughness to do it and that is what will separate you from the average person. Go get it!
4) Reward yourself when you reach small goals or make progress. Self acknowledge that you now can do 10 full pull-ups or can go a whole 45 minutes of working out with minimal rest. Maybe you buy something or maybe you give yourself a cheat meal to enjoy your favorite food.
5) Get to know others in the gym. One of the best ways to stay on track is to find other people who have similar goals as you. On those days when you don't feel like working out they can help push you through your workout. Once a community atmosphere starts to build you will now become more accountable and be more likely not to miss workouts.
6) Change things up! It gets easy to become unmotivated when you are doing the same thing over and over. Get yourself amped up to go to your next workout by doing something new. Change creates change.