I'd like to add to what the previous posters have said.
In WRITTEN form, "gonna" is slang, and would only be used in informal situations (when emailing friends, for example).
However, in SPOKEN English (at full speed) the words "going to" are very often contracted so that they sound like "gonna". In my opinion, "gonna" is a standardly accepted pronunciation of "going to" in normal everyday speech. You will even hear it in quite formal situations.