That's interesting. Where I grew up in Canada, "being pissed" could mean either very drunk (piss drunk) or very angry (pissed off) and you need to rely on context to disambiguate. On the other hand, the British phrase "taking the piss" would mean obtaining a urine sample and it's just downright confusing.
In America, "piss drunk" has a place but "being pissed" means exclusively "to be angry"... at least in every part I've ever been. I can't speak for upper New England, perhaps they'd take exception.
It's an extreme for "irony" - dissimulation (so extreme that I should add a /J). In other regions it would be "to fuck with someone".
I never understood the exact source of the expression. It could have been the mockery of stealing urine from the poor (who could actually sell it - I believe for example it is still used in tanneries around the world).