Semantic shift is when a word changes in meaning over time. When a word becomes associated with something, it can often gets a new meaning by association.
“gather” comes from Proto Germanic *gadurōną which also means “gather” which
is derived from the adverb *gadur. This word mean “together”, “gathered in one place”. *gadur is derived from Proto Indo European *gʰedʰ- which is a word that means “to unite”.
“good” comes from Proto Germanic *godaz, but this word in Proto Germanic is also derived from Proto Indo European *gʰedʰ-, so “gather” and “good” are actually cognate. Being united is a good thing, so over time the equivalent of “united” in Proto Germanic took on a meaning of “good”
Another example of semantic shift is the word “forest”. It comes from Proto Germanic *furhō “pine”. This word developed into the word *forhist in the language of Franks, a Germanic tribe that give France its name. This word eventually made its way into Old French as “forest”, and the French brought it to England. Over time the word that meant “pine” eventually began to be used to refer to the whole forest.