As Dave says, NEVER use it when writing English. It looks horrible.
'Gonna' is what 'going to' sounds like when someone is speaking fast, for example 'I'm going to miss the bus' may sound like 'I'm gonna miss the bus'. It isn't actually a word - it's just a sound of two words run together.