Epistemology, as systematic reflection on knowledge, is traced back to Aristotle who was the first to discourse explicitly about logic, e.g. how some true propositions are obtained from others and cases where it is not so. Gaining epistemological awareness is much like becoming aware of grammar: people can talk and they know lots of things without any 'theory', but, except for radical pragmatists, doing is usually taken to be different from knowing.
As the later name suggests it is second order knowledge: bio-logy is knowledge about life and epistemo-logy is about knowledge. Distingishing meta-knowledge became rather important in modern times when the cases science vs. religion were debated. However philosophy also rapidly lost credibility on empirical grounds and it turned more and more into epistemology. Raids into the domain have been carried from the factual side by psychology and cognitive science and from the theoretical - by mathematics.
(No need for refs about such well known history.)