The printing sense of galley, "oblong tray that holds the type once set," is from 1650s, from French galée in the same sense, in reference to the shape of the tray. As a short form of galley-proof it is attested from 1890.
indicating where something or someone is knocked, "into an extremely distressed or disabled condition," American English slang, by 1835; considered by OED to be a corruption of western England dialectal collyweston, name of a village in Northamptonshire ("Colin's West Farmstead") that somehow came to signify "askew, not right." But Farmer calls it an Americanism and goes in for it as an "indefinite superlative," and DAS also does not consider the obscure English term to be the source. Early nautical references suggest it might simply be what it looks like: a sailor's generic way of indicating something has been thrown pretty far by impact, based on galley in the "ship's cooking room" sense.
"Matter? why d--n my old shoes, Captain Williams, here is one of that bloody Don Dego's shot gone right through the galley-door, and through the side of the big copper, and knocked all the beef and hot water galley-west. ..." [N.Ames, "Old Sailor's Yarns," New York, 1835]
kind of large ship, 1520s, from French galion "armed ship of burden," and directly from Spanish galeón "galleon, armed merchant ship," augmentative of galea, from Byzantine Greek galea "galley" (see galley) + augmentative suffix -on. Developed 15c.-16c., it was shorter, broader, and with a higher stern superstructure than the galley. In English use, especially of Spanish royal treasure-ships or the government warships that escorted private merchant ships in the South American trade.
GALLEON. The accepted term for the type of ship which the Spaniards used in 1588; that is, an armed merchantman of exceptional quality, combining the strength of the mediaeval trader with some of the finer lines and fighting features of the GALLEY. [Sir Geoffrey Callender, "Sea Passages," 1943]
Italian agumented form of galea, galeaza, led to a different 16c. ship-name in English, galliass (1540s).