I think Harry is so much better at resisting the Imperius Curse than he is at Occlumency because . . . he had a better teacher for resisting the Imperius Curse. That’s right, a Death Eater pretending to be a mad ex-auror is better at teaching than career educator Severus Snape. Fake Moody prepared the students for what they would go up against and then let them practice defending against it.
We didn’t see much of it but I assume there was some debriefing with the watching students of what worked/didn’t work as each student tried to fend off the curse. Compare this to Snape’s pedagogy, which seems to be throwing Harry into the deep end of the pool and hoping he would magically (literally) learn to swim.