You should always use 'an' when the noun begins with a vowel SOUND. We are talking about SOUNDS, not spelling - this is phonological rule, not a writing rule.
The word 'universe' is written with a letter that's a vowel, but it's pronounced with a consonant "you-niverse". . The same goes for all words beginning with 'uni' - for example, a uniform, a union, a university - and also for words beginning with 'eu', such as 'a euro'.
Likewise, words which are spelt with a silent consonant are preceded by 'an' - for example, an hour (which sounds like 'an our' ) or an honour.
Other examples of this 'sound not spelling rule' are letters of the alphabet. For example, the letter 'M' is a consonant, but it's pronounced 'em', so we say 'an MBA', for example. Also, remember how numbers are pronounced - we say 'an 18-year-old', because 'eighteen' begins with a vowel sound.
So remember - it's all about how we say these words, not how we write them.