Old English ordel, ordal, "trial by physical test," literally "judgment, verdict," from Proto-Germanic noun *uz-dailjam "a portioning out, judgment" (source also of Old Saxon urdeli, Old Frisian urdel, Dutch oordeel, German urteil "judgment"), literally "that which is dealt out" (by the gods), from *uzdailijan "to share out," related to Old English adælan "to deal out," from *uz‑ "out" + PIE *dail- "to divide," Northern Indo-European extended form of root *da- "to divide." It is rare in Middle English, and perhaps the modern word is a 16c. reborrowing from Medieval Latin or Middle French, both of which got it from Germanic.
The notion is of the kind of arduous physical test (such as walking blindfolded and barefoot between red-hot plowshares) that was believed to determine a person's guilt or innocence by immediate judgment of the deity, an ancient Teutonic mode of trial. They were abolished in England in the reign of Henry III. English retains a more exact sense of the word; its cognates in German, etc., have been generalized as "judicial decision."
Metaphoric extension to "severe trial, test of courage or patience, anything which tests character or endurance" is attested from 1650s. The prefix or- survives in English only in this word, but was common in Old English and other Germanic languages (Gothic ur-, Old Norse or-, etc.) and originally was an adverb and preposition meaning "out."