4 Answers
4

As other answers have pointed out, it refers to a situation in which it's pointless to try because it's impossible to win: either you're going to get a hiding, that is, take a (metaphorical) beating on your hide, or else...nothing. There is nothing else. You're going to lose, and you're probably going to lose so badly that your opponent is going to gain nothing from beating you.

I liked you answer because the phrase doesn't just mean you aren't likely to win, the major emphasis is actually being beaten in trying to do so and high risk of attempting it.
–
sturnerApr 10 '11 at 9:23

If someone is on a hiding to nothing, it means they don't stand to gain anything from their endeavour: in a sporting context, it can be used to mean that they are bound to lose, or that they are so sure to win that the will gain nothing from it (for instance because the bookmakers' odds will be so poor - or simply because there is no prestige to be gained from beating a far inferior team). But its use is not restricted to sport: it can be used in any other context where the prospects are similar.

There is no strong association with any particular class or region, so far as I'm aware.

but in what sense is the hide in hiding contributing the meaning of the idiom?

Here, "hiding" is a noun used as a colloquial near synonym for "a beating". According to the OED, it goes back to activities involved in tanning a hide, related to the verb hide2, "2. To beat the hide or skin of; to flog, thrash". For the noun, OED gives this example from 1822 (not the oldest) for the equation with "a thrashing":

Giving him a severe beating, or, what was called, a ‘hideing’.
Thomas Bewick, Select fables..., 118.

Its use in the phrase a hiding to nothing means to get no benefit from this painful activity, as described already in the accepted answer.