Your understanding is correct.
The 'particle' (I do not know the correct term for a word used like this) got can be used in conjunction with the modal verb to have to, as per your example, and also the verb to have (in the sense of possession), when used in the present-perfect.
According to Oxforddictionaries.com and The Urban Dictionary, in addition to the meaning given in your example, gotta also serves as a contraction for the conjunction of have and got in the sense of being in possession, e.g. 'I have got a secret to tell you' can become 'I gotta a secret to tell you'.
For what it's worth, as a native speaker of British English, I would use gotta in both of these senses in informal spoken language, but for some reason I would only ever use it in informal(!), written contexts as a contraction for the modal to have to, i.e. while I would write 'I gotta go', for example in a text message, I would never write 'I gotta new jacket'. I do not know if this is typical of my dialect, or just something personal, though I suspect it's the former.
I would not use gotta in any formal context, neither as a contraction for to have nor for to have to.
As an aside, it is of course possible to use 'I have got to' with the verb 'to get', e.g.
I have got to get a new car!
The pronunciation can be contracted to the audibly pleasing
I've gotta getta new car!