Training hard is more important than following a plan. And if you're losing motivation, it'll be more difficult to train hard. Someone who trains brutally hard with laser-like focus on a very basic plan will get better results than someone who trains at 80% on the best plan designed by man.
The key to training hard is motivation. And the foundation of motivation is looking forward to doing what you have to do. If you start to get bored with your training, there's a good chance that your motivation will fade and your training intensity will erode gradually, without you even noticing it.
What can you do when you're losing training motivation? I have three solutions:
Look at how you were training, and for a week or two do the opposite in as many ways as possible.
You get the idea. That change will either rekindle your training motivation by making you enjoy the gym again, or it will make you yearn for the training you were doing.
Read a lot of training articles or books by people you respect and look for the one training program/methodology that gets you excited. Choose the plan that makes you go, "Hmm, that looks really cool!"
Oddly enough, don't go with the program that sounds the smartest or the most based in science – go with the one that gets you amped up. Even if that program doesn't address your immediate goal directly, it doesn't matter. It's better to train hard even if it's not 100% what you need. Train like a wuss and you'll lose even more motivation.
I've written about neural charge training and how it improves CNS recovery and working state.
Often, a loss in motivation can be the result of a fatigued CNS. So replace a normal training week with 3-4 neural charge sessions. If your problem was a nervous system issue, I guarantee that before the week is over you'll have a hard time containing yourself and you'll want to hit the weights hard again.