I think it’s evident that there’s no etymological relation between gut and Gott (not even between good and god for that matter). Along their respective ancestries however, both words share forms of similiar sound (or shape).
- New High German gut ←
Proto-Germanic *gōdaz ← Proto-Indo-European *gʰedʰ-
- New High German Gott ← Proto-Germanic *gudą ← Proto-Indo-European ǵʰuto-
While it’s relatively clear that gut originally meant “to be associated” or to “suit”, it is suspected that Gott meant something like “invoked idol” in primordial times.
Note that you’ll find competing and even conflicting information. For starters, see the etymology panel in the DWDS entry for Gott and particularly the Wikipedia article dedicated to the word god.