Let’s take a look at the Gaelic sound made by the letters gh.
If gh is used alongside a broad vowel (a, o, or u) it is pronounced like a soft ‘g’ made at the back of the throat. We can hear this in mo ghuth (my voice):
If gh is used alongside a slender vowel (e or i), it is pronounced like the letter ‘y’. We can hear this in a’ ghealach (the moon):
If gh follows a slender vowel (e or i) in the middle or at the end of a word, it is silent, such as in the word dachaigh (a home):