ganz generally means something like "to some degree, but not too much". You would most often use it in a construction like:
Es geht mir ganz gut (, aber...)
Der Film ist eigentlich ganz lustig (, aber...)
Sie mag ihn ganz gerne (, aber ...)
Ich bin ganz froh, dass ...
The sense of "very" is less common, and mostly used with things that are a little bit negative in context:
Ich habe ganz lange geschlafen
Seine Frau ist noch ganz jung
Es ist schon ganz spät
Some phrases could mean either thing, being a polite / rhethorical overstatement or a honest statement:
Dieser Kuchen schmeckt wirklich ganz lecker
Mir ist ganz schwindlig
So the difference is not about the word "gut"; it's just two different usages of the same word. To decide which option is meant, you can look for words like "aber" or "eigentlich", which probably point to the first meaning. "Schon" in the meaning of "eigentlich" also fits in that category, but "schon" in the temporal sense points to the second, as does "noch". "Ganz schön" always means "very/remarkably":
Der Film ist ganz schön lustig => The film is very funny
Du kannst das ganz schön gut => You're very good at this
Es geht mir ganz schön gut* => I'm doing pretty well
* The specific phrase "es geht (mir/dir/jemandem) ganz schön gut" is a criticism; it means the person is too confident. But the literal meaning is "very good".
But the most important thing to look at is the context.