"I want a red hat."
Translation:Dw i eisiau het goch.
Like all languages with genders, you are supposed to learn them! However there are some general guidelines you can find that help a bit. The problem is that there are always exceptions (and I always find I cannot remember the guidelines when trying to decide!) However one useful guideline is that there are more masculine nouns than feminine, so if in doubt, go for masculine.
I looked up the general guidelines, and offer them here, for what its worth. Your mileage may vary though, because as I said, I can never remember the guidelines and find it easier just to learn genders. Anyway:
In people or animals, gender usually corresponds to sex.
Words with these endings are usually masculine: -yn, -wr; -ad, -deb, -der, -edd, -had, -yd
Words with these endings are usually feminine: -en, -es, -wraig; -aeth, -as, -fa, -ell
Names of days, months, seasons, compass points are masculine.
Names of geographical features such as countries, regions, towns, rivers and trees are usually feminine, as is the weather.
Verb-nouns are masculine.
Most collective nouns are feminine.
There are more masculine nouns than feminine.
Because eisiau is not a verb. In English it is a verb, but it is not in Welsh. You can't conjugate it like a verb. It is technically a noun. "A want". You can only use it with a helper verb (as here). Angen is also not a verb.
So verbs take yn after the verb "to be" but eisiau and angen do not.
In North Wales dialect you may hear "mae eisiau het goch arna i" which is literally (and more correctly) "I have a want/desire on me for a red hat".