In the film The Dark Knight, Jokers ability is shown as:
He is also shown to be a skilled, fearless, and unpredictable fighter, taking on mob henchmen and cops with ease, and showing how he can be lethal with many forms of weaponry; and was even capable of holding his own against Batman and trapping him near the climax of the film (although he had assistance on both occasions when fighting Batman).
The reason behind his enviable power is also described in the wiki beautifully:
One explanation for the Joker's fighting skills might have to do with his psychotic personality: the Joker doesn't really fear physical damage to himself like a normal person would, and even when brutally injured laughs at his own pain. His casual insensitivity to pain, and his extreme fearlessness, lets him take risks that a normal person wouldn't even attempt, and so most people just don't see his attacks coming, i.e. walking into a room full of mobsters and casually using a 'magic trick' to impale a pencil into one of their heads. The Joker's obliviousness to danger makes him invulnerable to what is usually Batman's greatest weapon in combat: his ability to frighten low-level thugs.
Considering the Joker was originally taken from the comics of Batman, we should give importance on how his character has been portrayed by the writers. Wikipedia says:
Joker's skills in unarmed combat vary considerably depending on the writer. Some writers have shown Joker to be a very skilled fighter, capable of holding his own against Batman. His versatility in combat is due in part to his own extensive array of hidden gadgets and weapons on his person that he often pulls out on a moment's whim (rolling a handful of explosive marbles on the ground, retractable knives attached to his spats, etc.); other writers, on the other hand, portray Joker as physically frail to the point that he can be defeated with a single punch. He is, however, consistently described as agile.
As the film is an adaptation of the comics, we can say it is assumable that Joker in the film also depicts his inherent ability to withstand extreme pain and return a fight. It is his innate quality and skill.