Wish I knew.
Habit, I think, is the main thing. If you go to the gym MWF, then that's just what you do. End of story.
So if you can schedule in your training sessions at the same times those days, that will keep you there.
Even though I don't have one now, I've also found that having a training partner can be useful. Even if you don't want to be there, you know that other guy is counting on you, so you show up. Some of my best training sessions have come on days when I didn't want to be there and my partner didn't want to be there, but we both showed up for the other guy. Sometimes it takes a little bit to get warmed up.
Training journals are good. I have that "if it's written down, it's going to happen" attitude, and that helps.
Remember that the hardest part is getting yourself laced up and out the door. I find that, the nearer your gym is, the better. A garage gym is awesome. If not that, get something that's in between your house and your work, if possible.
Negative motivation always works for me, too. I go and look at fatties.
Or hot chicks. That's always good.
Dan "Mmm. Hot Chicks." McVicker