The Italian slur guinea is the old name for the African coast. It's presumed to be applied to olive-skinned Italians in order to lump them in the same category as black slaves.
It's a centuries-old title from India. At that time, a person with a person had to do a lot of living to earn the reputation as a guru. The idea of having a wealth of experience survives to this day.
Example: People in cars often provide hand signals to communicate their dissatisfaction with your driving. They are trying to get your goat, so just smile and wave.
Origin: This may be a mispronunciation of "get your goad". A goad is a pointed rod used to urge on livestock. A modern equivalent of a goad is the cattle prod. To goad is to stimulate into action. The phrase "goad you on" comes to mind. To "get your goat (goad)" then is to be successful in stimulating a response.
Alternatively,
The word gut down through the years was altered to goat. When something gets your gut, it upsets you and ties your stomach in knots.