The prefix comes from the Greek preposition and prefix meta- (μητά-), from μητά, which meant "after", "beside", "with", "among" (with respect to the preposition, some of these meanings were distinguished by case marking).
Other meanings include "beyond", "adjacent" and "self", and it is also commonly used in the form μητα- as a prefix in Greek, with variants μητ- before vowels and μηθ- "meth-" before aspirated vowels.
The earliest attested form of the word "meta" is the Mycenaean Greek me-ta, written in Linear B syllabic script.
The Greek preposition is cognate with the Old English preposition mid "with", still found as a prefix in midwife. Its use in English is the result of back-formation from the word "metaphysics". In origin Metaphysics was just the title of one of the principal works of Aristotle; it was so named (by Andronicus of Rhodes) simply because in the customary ordering of the works of Aristotle it was the book following Physics; it thus meant nothing more than "[the book that comes] after [the book entitled] Physics". However, even Latin writers misinterpreted this as entailing that metaphysics constituted "the science of what is beyond the physical".
Nonetheless, Aristotle's Metaphysics enunciates considerations of natures above physical realities, which can be examined through this particular part of philosophy, e.g., the existence of God. The use of the prefix was later extended to other contexts based on the understanding of metaphysics to mean "the science of what is beyond the physical".