Let me start by a shameless plug.
I've written an article on Gamedev about how to remain motivated during indie development.
Essentially, my system revolves around consistent development and helping you build a "system". In essence, it slowly forces you to incorporate a development cycle into your life cycle, until it feels natural and can't simply be skipped altogether. After a while it DOES become a habit and is much more satisfying.
That being said, your original post seems to be hinting not specifically at how to remain motivated to develop, but to remain motivated by a single project. While I think the above guide is still applicable, I see a few nuances.
I'd like to turn the question around and ask "why would I stop working on this game?". You'd probably have to come up with a list of reasons why you think this isn't worth your time, and have a number of "cost-of-option" circumstances to analyze. Maybe it is that you do have something better to be working on at that precise moment in time. It did happen to me, but I tend to return to any worthwhile project later (such as now, resuming work on a 3 months hiatus project).
Also, there can be no expert at motivation, just individuals that know themselves better and understanding how their brain works and coping with it. That being said, without being an existentialist, I don't believe everyone's brain is wired the same way, so what works for me (as per the above) may not work for you. I strongly believe however that, a system, is a solution that is nearly universal. Afterall, that's why many of us choose to go to work from 8 to 5!