'Gjerne' comes from the Old Norse word 'gjarna' meaning willingly, which comes from the Proto-Germanic word 'gernô' which is the adverb of the adjective word 'gernaz' also meaning willingly or eager.
'Yearn' comes from the Middle English word 'yernen' which comes from the Old English word 'giernen' which itself comes from Proto-Germanic 'girnijaną' meaning to want or desire. 'Girnijaną' is a verb that's derived from the adjective 'gernaz.'
TLDR: Yes, they come from the same Proto-Germanic roots.
The translation I would gladly like a cup of coffee is not what real English people say now. It might have been 100 years ago. My point was that in the tips section, there was another mention of this other meaning for gjerne until the sentence was given. I like to know beforehand. This happens quite a lot Inhave found. The other aspect of this version is that the tense is now the conditional and up till now we have only had the present tense.