Hunger is a good sauce. It was the day the Roman Army was routed by a band of pagan Celts at the banks of the river Allia. Almost four centuries later, Julius Caesar would take Rome's revenge on the clans of the continental Celts. The definite article 'an' prefixes a 't' in the nominative and accusative case before all singular masculine nouns that begin with a vowel.
Endings can give a clue.
In general, nouns ending with broad consonants are usually masculine. However, there are exceptions. To be certain, therefore, it is a good idea to memorize the noun's gender when you learn the noun.