Several times per day, check that you are actually working on the right task by asking yourself this question:

If the only thing I complete today is the task I am currently working on, would I be satisfied with my day’s work?

I read this somewhere and it really does help me to prioritise. It sounds simplistic and a bit naff, but it often works. Try it.