The first time I was told about the strangeness of the word ‘gli’ (and of the ‘gl’ sound in general) was when I was at school in Florence. I had just amused everyone by reading some Italian and pronouncing ‘gli’ as ‘GLEE’. The teacher explained to me how it is pronounced and said that it is quite a tricky sound, and even some Italians do not pronounce it quite correctly.
The usual way in which most students of Italian as a foreign language end up saying ‘gl’ is something like the ‘y’ in ‘York’. So “gli” is usually pronounced “yee”. The other way is to simply ignore the “g” and pronounce the ‘li’ as ‘LEE’. So the phrase ‘gli anni’ becomes either ‘YEE ANNEE’ or ‘LEE ANNEE’. Either is probably quite acceptable and will be understood.
However, if you want to get the pronunciation more accurate, it is important to try and pronounce the consonants “l” and “y” together. This is what makes the sound so tricky to form–it is neither ‘LEE’ nor ‘YEE”, but ‘LYEE’. You need to first form the ‘L’ sound, smoothly change it into an ‘Y’, then finally progressing into the vowel sound ‘EE’.
It’ll come with practice–just don’t say “GLEE”.