It's something a man (not usually a woman) would say: "I gotta take a whiz." It is "got to" but Americans say it: "gotta."
Another common expressions men might use to describe the need to pee: piss. It would be WEIRD if a woman said it. "Pee" is okay for women, but we often say something like "I really need to go!" making it clear we need to go the toilet, although Americans often say bathroom (even if there is no bath in the room!) or restroom (and we don't normally rest there either!)
I hope that helps. :-)