Thanos in the Infinity Gauntlet was an unbeatable villain who was beaten. Even though no one knows exactly how they'll handle that in the upcoming Infinity War movie, I won't spoil it for those who are unfamiliar with the story, suffice to say, he wound up being his own worst enemy.
That's the only way you can handle characters like these I feel, if you give them godlike strength, that must come with equally heightened levels of arrogance, hubris, single-mindedness, stubbornness, etc. All of which are negative traits that clever protagonists can use against the villain into manipulating him into making a fatal mistake.
In Eragon, the villain is all powerful, but lacks any empathy. Since none of the magic dealing with might or brute force has any effect on him, the protagonist instead uses up all of his magic to give him empathy, so that he can feel the pain and suffering of those he's wronged, and that defeats him.
The defeat of general Zod in the old Superman 2 movie was good too. A simple deception tricked him into losing all his powers.