Middle English baylle, "wall enclosing an outer court" of a castle, fortified city, etc. (c. 1200 in Anglo-Latin, late 13c. in place-names), a variant of bail, from Old French bail "stake, palisade, brace," which is of unknown origin, perhaps ultimately connected to Latin bacula "sticks," on notion of "stakes, palisade fence."
The word was extended to mean the outer court itself (early 14c.). Hence Old Bailey, seat of Central Criminal Court in London, so called because it stood within the ancient bailey of the city wall. The surname Bailey usually is from Old French bailli, a later form of baillif (see bailiff). Bailey's, the Irish whiskey- and cream-based liqueur, was introduced in 1974 and said to have been named for the historic Bailey's Hotel in London.