The country was first. Turkey has been known as “land of the Turks” since the 1300s at least.
Turkeys (the birds) are originally from the Americas. The Europeans knew a similar looking and tasting bird, known nowadays as Guinea fowl, originally from Africa but introduced through the Ottoman Empire, who was called the turkey-cock or turkey-hen. When the Europeans arrived to the Americas and found the bird we now know as turkey (Meleagris gallopavo), they called it turkey by association. In other countries it is called different names, referring to the geographical origin, and mostly getting it totally wrong:
The Turkish word is hindi. The original word in French, coq d’Inde, meant rooster of India, and has since shortened to dinde. These names likely derive from the common misconception that India and the New World were one and the same. In Portuguese, it’s literally a “Peru bird,” and in Malay, it’s called a “Dutch chicken.”
In Spanish, we call the bird “pavo” which is embedded in the Latin name that describes the species. Once again, the name comes from another bird, the peacock, “pavo real” (Pavus cristatus) which is originally from India. Different Latin American countries call the bird with names derived from the native American name, such as “guajolote”.