It's not pronounced like "g". I think your ear is being tricked by the softening of "d," which occurs when "д" appears before і, ї, є, ю, я, or ь.
Yuri Shevchuk produced an excellent booklet that discusses the pronunciation of Ukrainian and provides anatomical depictions of tongue, lip, and teeth placement for making the sounds appropriately.
This is separate from his Hippocrene textbook (http://www.hippocrenebooks.com/store/p25/Beginner%27s_Ukrainian_with_Interactive_Online_Workbook.html), but I don't know if he's published it yet. I'll look into it.