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, as in these examples, which have the same meaning as the sentences above:
With or without have, gotta is very casual, and should only be used in informal conversation or when writing a representation of informal conversation.