For independent countries, the rule is relatively easy:
If the name of the country is neuter singular and not a compound expression, no article is used: "Österreich", "Deutschland", "Japan", "Kanada". This applies to the majority of countries.
The article is used if the name of the country is
- masculine: "der Vatikan", "der Senegal",
- feminine: "die Schweiz", "die Slowakei",
- a compound expression: "das Vereinigte Königreich",
- or plural: "die Niederlande", "die Philippinen".
For regions that are not independent countries, it gets much more complicated. Regions that are grammatically neuter singular
sometimes need an article and sometimes not. It seems that there is absolutely no rule for this case:
- "das Saarland", but "Niedersachsen",
- "das Tessin", but "Graubünden",
- "das Burgenland", but "Vorarlberg",
- "das Elsass", but "Lothringen".
Strangely, some country names need an article in English, but don't have an article in German (since they are neuter singular): "The Gambia" (en) vs. "Gambia" (de).