an indefinite article before words beginning with vowels, 12c., from O.E. an (with a long vowel) "one; lone," also used as a prefix an- "single, lone;" see ONE (Cf. one) for the divergence of that word from this. Also see A (Cf. a), of which this is the older, fuller form.
In other European languages, identity between indefinite article and the word for "one" remains explicit (e.g. Fr. un, Ger. ein, etc.) Old English got by without indefinite articles: He was a good man in Old English was he wæs god man. Circa 15c., a and an commonly were written as one word with the following noun, which contributed to the confusion over how such words as NEWT (Cf. newt) and UMPIRE (Cf. umpire) ought to be divided (see N (Cf. N)).
In Shakespeare, etc., an sometimes is a contraction of as if (a usage first attested c.1300), especially before it.

Etymology dictionary. 2014.