what is g in japanese?
It is written as g (by Westerners!), but that's simply a polite and convenient lie - just like the 'f' in ふ, the 'h' in ひ, the 'sh' in し, the 'ch' in ち, the 'u' in the whole う-row of the kana table, and so on. These are all approximations, and Japanese people do not think of these sounds in the same way as you do.