Here's how it works:
* Masculine Articles: "Le" is used before countries ending in a consonant: Le Sénégal, Le Gabon, Le Mali.
* Feminine Articles: "La" is used before countries ending in a vowel: La Côte d'Ivoire, La République Centrafricaine, La Guinée.
So, it's more about the grammatical structure of the French language than any concept of gender assigned to countries.