Great question!
Yes, we can use "gonna" to say "going to". You will hear this frequently by both American and British English speakers. Using "gonna" correctly will help your English sound more natural.
"Gonna" is not rude or bad English. It is just the shortening of a phrase that English speakers use very often. In fact, the "What are you" part of your question is often shortened as well.
And so the question, when spoken, can be shortened from "What are you going to do?" to "Whaddya gonna do?"
When writing, and especially when writing formally (for example, a job application cover letter, or business correspondence), yes, we should write out the full "going to". But when spoken, whether it's a family member of the President, you will hear "gonna".