It is a short form of have got to.
Gotta is a way of writing got to that shows how these words are pronounced in the expression have got to in casual speech: have gotta.
Have gotta is an informal way of saying that something is necessary or must be true.
In very informal language, gotta is sometimes written and spoken without have.
- I gotta go now.
- He’s gotta be kidding.
- I gotta go now.=I have to go now.
- Gotta ciggie?=Have you got a cigarette?