When you're in a setting that has fantastically empowered people, be it with magic, robotic suits, psychic powers or just the good old fashioned Superman Default Selection of Superpowers, it can be tempting to have the characters just bulldoze through everything in their path. Solving any problem in a matter of moments, with no bad guy too tough or situation too large for them to deal with. Heck, this was considered to be one of the possible inspirations for Superman, creating a character that Siegel and Schuster could use to solve the problems that they weren't equipped to deal with as teenagers in 1930s America, be they slumlords, gangsters, war profiteers, mad scientists etc. etc.
But really, where is the line that you draw between getting your character be an awesome and extrahuman person who can be used well in stories, or them becoming that most dreaded and overused of terms that now haunts all discussion of fiction today: A Mary Sue.
To me at least, the solution is simply this: Make it fair for both parties, make it consistant and if you end up in a situation where two characters face off against each other who are are opposite ends of the scale, find a way to solve the solution that fits for both characters without it seeming that you're just pulling something out of their ass.
For example, in the one hand you have Batman, who is at his core a very smart detective in a costume who can afford the best toys for the job at hand. And on the other you have Darkseid, a literal god and the personification of the concepts of both evil and fascism within the DC Universe, who has ruled his own planet for thousands of years with little to no resistance and is physically powerful enough that the only characters who can take him on in a fistfight are Superman and his own son, Orion, who is also a god.
On paper the two wouldn't even come into conflict on a regular basis, Batman being more suited to gangsters and crazy people in colourful costumes than Space Gods, while Orion is more about trying to conquer the universe than getting involved with petty street crime (when he gets involved with street crime, he wants it to be street crime worthy of knocking Superman on his ass if his involvement with the group Intergang is anything to go by), but despite this, Batman has gone up against Darkseid at least twice and beat him, twice. How can this be, without getting into lazy ideas like "because Batman is the hero, so he'll win anyways" logic?
With the first example I'll discuss here, we have the meeting in the Superman/Batman: Supergirl storyline, which introduced the current version of Supergirl to the DCU. Within the storyline, Darkseid abducts Kara Zor-El, Superman's cousin, for the combined motives of having a pet Kryptonian in his pocket to facilitate in his domination of other worlds, and for the added bonus of taking Superman's only living biological relative and twisting her into being a violent and twisted extension of his will.
While the superpowered Superman, Big Barda and Wonder Woman battle the brainwashed Supergirl, the regular human Batman confronts Darkseid in a confrontation that should be laughably one sided. Which it is, in a physical sense. What Darkseid doesn't count on is, a) Batman being really, really damn clever and b) Batman determined and ruthless to make the kinds of threats that Wonder Woman and Batman are incapable of making due to the nature of their characters. That is, he hacks into Darkseid's collection of doomsday devices and threatens to blow up his planet if he doesn't relinquish control over the teenage girl. Considering that killing is anathema to Batman, the whole move is a massive bluff on his part, but it's a bluff that pays off as it gets Darkseid to back down in order to preserve his domain and out of respect for the shear amount of balls Batman displayed in such a move.
The scene, compete with creepy approximations of the late Michael Turner's art style, can be viewed below,
This scene works as both characters stay within character, and use previously established canon and personalities to justify Batman's victory. And considering the amount of physical punishment that Darkseid dished out to Batman first, it wasn't exactly that easy a win for the human either, which with Darkseid being strong enough to smack Superman around when roused.
So there is an example of how for how a nonpowered character can beat an empowered one without sorting to such cheap tactics as, say, Batman suddenly having a ring for a material that harms Darkseid that hadn't been previously established within the story. However, although I'm for character consistency and all, sometimes it's necessary within the context of the story for an empowered character to fight a nonpowered one. This logically means that one has to be more powerful than the other in order for there to be a clear winner, but really, if all superhero battles are just automatically resolved automatically by the one being the most powerful on paper winning, then all comics would be kind of short and predictable.
Like if every story involving
Superman was only a page long as he's already faster and stronger etc.
than almost anyone else in his universe, so no one can out think, out
fight or out plan him in any way. Nonpowered characters have to be able
to fight back against the empowered ones SOME HOW otherwise it just
leads into bad storytelling and creepiness like Fletcher Hank's infamous Stardust the Space
So in Superman's case he has to go up against people who are as strong, if not stronger physically, while his more common enemies try to best him in some other, be it through Science (Lex Luthor, Brainiac), Magic (Morgan Le Fey, Satanus) or Psychic powers/brainwashing (Darkseid's group during an arc in the Bruce Timm animated series). In Batman's case he's often both more physically powerful than his opponents, so the story comes from how he defeats the bad guys mentally or solves a mystery rather than just punching them into submission. Working out what exactly Mr Freeze is going to do with various components stolen from cryogenic firms, what they can be assembled into, why he's targetting who he's targetting, and the like.
To use another DC example from the opposite direction, with a superpowered hero going up against a nonpowered villain, without it being a really short battle with the hero simply steamrolling the bad guy, we can take the example of Batman's archenemy, the Joker, going up against Superman.
As I said earlier, in order for a villain to be an effective villain for Batman, you have to be able to think a couple of step ahead of the World's Greatest Detective or else you're just another thug he's stringing up by his ankles in an alley somewhere. So when going up against Superman, the Joker applies his talent for complex schemes against the Man of Steel by exploiting his well known weaknesses, ie his inability to see through lead, his attraction to Lois Lane and his weakness to Kryptonite.
Lex provides the setting for the death of Superman, by allowing the Joker the use of one of his abandoned facilities, Lex having had all of his building lined in lead to keep out Superman's snooping x-ray vision some time previously. Lois, despite being a very capable person, is also a celebrity who happens to be dating Bruce Wayne at the time of the story, so she's very easy to find due to amount of papparazzi following the apir around. While the kryptonite the Joker finds himself, in the form of an ancient Chinese statue that he twigged was made of the alien material by reseaching its appearance and the list of previous owners that died of radiation poisoning from the "jade" statue.
At this point Superman wasn't really that familiar with either the Joker or Batman, so despite Batman's warnings he doesn't take him that seriously, though he does wear a lead suit to shield himself from the kryptonite's radiation. Wearing his armour he appears to think that he has the drop on the clowny lunatic, so he let's his guard down, and well... it doesn't go well for him when the Joker melts Superman's suit with his acid-spraying lapel-flower, which is a standard piece of the villain's arsenal. The Joker NEARLY defeats Superman because the hero didn't take the less physically powerful one seriously, the Joker did it with all the means and methods he was established to have without just making something up on the spot.
The lesson behind this, I guess, could be that characters should just stick to the stories that they were designed for, otherwise it just gets silly. But this doesn't have to be the case, as I believe that a good enough writer can take a situation with a god-level character going up against a regular human without it seeming to be one sided or silly. Just because a character is effectively a physical god, like Superman or Korra, doesn't mean that just because they're more powerful than the average schmoe that the average schmoe can't put up enough of a fight for the story to be interesting.