"Orient" first appeared in Old French in 1080, in the Chanson de Roland, and came from the Latin oriens (orientis is the present participle of the verb oriri, meaning "to rise" or "to emerge"). By the early 12th century, the orient had come to mean a region lying east of a given point, while the Orient was, more poetically, the place where the sun rises.
The verb "orient" (1690) was preceded in 1485 by its past participle, in the phrase "well oriented," used of places favourably positioned in relation to the sun. Buildings were generally oriented—most often towards the east in the case of old churches. "To orient" initially meant "to position something in relation to the cardinal points," and later "in relation to a given direction." In geography, a map is oriented (1680) by marking the cardinal directions and aligning north on the map with true north.
Geometry adopted the term much later, in 1899, chiefly in the past participle: directed line (a line given a positive direction, indicated by an arrow).
"Orientation" (the act of orienting) entered geographical usage in 1834 to mean marking the cardinal points on a map; by 1840, it also meant determining one's position on a map or in a particular place.
By the late 19th century, orientation in the sciences had come to mean establishing coordinate axes in a system, with notions of absolute or relative orientation. Through a surprising broadening of meaning, orientation has lost touch with its etymology: after all, a garden can face due south!
References: