"It is a dirty kitchen."
Translation:Is cistin shalach í.
Because it doesn't contain a definite reference. Likewise, your sample sentence shouldn't include the first é.
If you wanted to say "It is the dirty kitchen", you could say:
Is í an chistin (chisteanach) shalach í. In this case, the first í is required for Munster and Connacht Irish, but not for Ulster.
In most cases you just have to learn it. Most nouns ending in a slender consonant, like cistin, are feminine, but there are some exceptions, notably nouns that refer to male people (e.g. athair, deartháir); also nouns ending in the suffix -ín are always masculine (even cailín despite meaning 'girl').
Many of the terms for jobs or occupations end in -eoir or -óir - those words are all masculine - dlíodóir, feirmeoir, uaireadóir, bádóir, isireoir, etc.
There is a guide that will help you get the gender of most nouns right here.
I agree that it's really unsettling when noun and adjective don't do the same thing. It makes sense in Irish though, when you consider lenition as something different from gender/ number/ case. Lenition facilitated the flow of sound when certain letter combinations would have obstructed it (more info at nualeargais.ie under the chapter Initial Mutations). Seeing the cause as sound-related (ease of speech), rather than logic-related (grammatical function), helped me come to terms with the fact that an adjective can be lenited although its noun isn't.