Thanks all for the info!
Especially to Elvellon, for his mention of this unexpected (for me) version that it was arabs who’d borrowed the name of the instrument rather than it came from them.
The origin of the word “gaita” is well grounded and looks convincing.
This is what online English Etymology Dictionary says:
goat (n.)
Old English gat “she-goat,” from Proto-Germanic *gaitaz (cf. Old Saxon get, Old Norse geit, Danish gjed, Middle Dutch gheet, Dutch geit, Old High German geiz, German Geiß, Gothic gaits “goat”), from PIE *ghaidos “young goat,” also “play” (cf. Latin hædus “kid”).
The word for “male goat” in Old English was bucca (see buck (n.)) until late 1300s shift to he-goat, she-goat (Nanny goat is 18c., billy goat 19c.). Meaning “licentious man” is attested from 1670s. To get (someone’s) goat is from 1910, perhaps with notion of “to steal a goat mascot from a racehorse,” or from French prendre sa chèvre “take one’s source of milk.”
It is absolutely no wonder that a bagpipe was named after a goat - here in Ukraine local bagpipe is called “koza” that literally means “she-goat”. This is what its bag is usually made of, as all know, of course. Not mentioning the sound which resembles goat bleating.
But while the origin of the name of the Spanish bagpipes (gaitas) seems to be clear, the main question I’ am most interested in is not answered.
Is there a connection between GAITA and GAIDA and if there is, how did it happen?
I decided to research what Bulgarians say about the origin of the word GAIDA and found some interesting and somewhat mutually exclusive versions.
1.Official version, taken from the Bulgarian Etymological Dictionary 1971, p224, says this

this is in Bulgarian but since it is a language close to my native Russian I can read it bit.
The article mainly says that the word “gaida” came to Bulgaria from Arabs through the Turkish (as well it did to other lands which used to be under turkiс rule).
- One more version found here says:
“Народните музикални инструменти, с които си служи българинът открай време, също носят отглас от далечната прародина. На първо място това е думата “гайда”, за която официалната теория гласи, че е била предадена на българите от арабите, понеже в някои арабски езици се среща думата “гайта”. В Памир и Хиндокуш обаче се среща думата “гайга” - свирня, а гайдите се наричат “гай” или “джай”, което значи буквално “мях” и съвпада по смисъл с едно от имената на гайдата в българския език - мешина. Друг широко разпространен музикален инструмент - кавала - напомня твърде много памирското понятие “кав” - пея, а също и кюрдското понятие “кавал”, с което се наричат кюрдските народни певци и особено изпълнителите на кюрдски религиозни химни.”
that translates as:
“The traditional music instruments used in Bulgaria since ancient times bear a voice from its faraway land of origin.
In the first place there is a word “gaida” - official version of its origin claims it came to Bulgaria from Arabs though there are no word “gaida” in any of the Arabic languages. In Pamir and Hindoukush we can meet a word “gaiga” meaning “whistling” while bagpipes are called “gai” or “jai” which literally means “skin” or “bag of a bagpipe” and coincides in meaning with Bulgarian word “meshina”. Another common wind instrument’s name - “kaval” very much resembles a Pamir word “kav” - “to sing” as well as Kurdic word “kaval” which denotes traditional kurdic singers of religious hymns.”
3.One more source under the name “The origin of Bulgarian words” gives this:
Гайда → гаи - пея - санскрит, - meaning - Gaida - from sanskrit “gai” - to sing. No proof, just as it is.
Of these the official version seems to me more or less reliable.
It actually confirms the assumption that the word GAIDA may have come to eastern Europe from north-east Spain via Magrib Arabs and Turks.
But yet, the middle links of this chain remain obscure.