Yes, this. I have no problem working when I'm excited about the work. If I'm not excited, then it's usually some extra-curricular problem or the work is not the kind of work that inspires me.
There's a difference between dealing with a little boredom or muckwork in a project (there's always some of that) and the sort of relentless, day-long, can't do anything procrastination the OP describes.
Sure, we all have those little jobs we don't want to do... But if you find you just can't get anything done for days at a time, it means your subconscious is trying to tell you something. You'd be wise to try and figure out what, and take steps to address the underlying problem.