late 12c., "formal assembly held by a sovereign," from Old French cort "king's court; princely residence" (11c., Modern French cour), from Latin cortem, accusative of cors (earlier cohors) "enclosed yard," and by extension (and perhaps by association with curia "sovereign's assembly"), "those assembled in the yard; company, cohort," from assimilated form of com "with, together" (see com-) + stem hort- related to hortus "garden, plot of ground" (from PIE root *gher- (1) "to grasp, enclose").
Both senses of the Latin word emerged in English. From the purely physical sense come "palace, residence of a sovereign" (c. 1200), "enclosed space connected with a building or buildings" (early 14c.), and the sporting sense "smooth, level plot of ground on which a ball game is played" (1510s, originally of tennis). Also "short arm of a public street, enclosed on three sides by buildings" (1680s), formerly noted for poverty or as business districts.
From the notion of "surroundings of a sovereign in his regal state" (c. 1200) comes the legal meaning "a tribunal for judicial investigation" (c. 1300, early assemblies for justice were overseen by the sovereign personally), also "hall or chamber where justice is administered" (c. 1300). As an adjective, "pertaining to a court," late 13c.
1570s, "endeavor to gain the favor of by amorous attention," also "solicit, seek to win or attract," from court (n.), based on the sorts of behavior associated with royal courts. Related: Courted; courting.
also court martial, "court of military or naval officers to try cases of desertion, mutiny, etc.," 1650s (plural courts martial), originally martial court (1570s), from court (n.) + martial (adj.). Word-order changed on the model of French cour martiale. As a verb, from 1859. Related: Court-martialed. Middle English had court-spiritual "ecclesiastical court" (late 15c.).
1660s, "national legislative assembly of Spain; parliament or legislature of Portugal," from Spanish and Portuguese plural of corte, from Latin cortem (see court (n.)).
"one who attends the court of a sovereign," c. 1300, courteour (early 13c. as a surname), from Anglo-French *corteour, from Old French cortoiier "to be at court, live at court," from cort "king's court; princely residence" (see court (n.)).
late 15c., "well-mannered, courteous, having manners befitting a court," from court (n.) + -ly (1). Compare courteous. Meaning "pertaining to the court" is from late 15c. The elegant, polite, refined courtly love "highly conventionalized medieval chivalric love" (amour courtois) is attested from 1821. Related: Courtliness.