I have a feeling that, as woofgang touched upon, that it derives from the french. Aren't we supposed to use 'An' before every word starting with an H? An Hotel, an Historic, an Hamburger etc. The french have real trouble pronouncing the letter H and so shouts of 'allo to passing englishmen isn't uncommon.
I would have thought that following the Norman invasion of 1066 this was just another habit we picked up from the french.
An heirloom is a good example of the 'an' and a silent 'h' working.