Old English scip "ship, boat," from Proto-Germanic *skipam (cf. Old Norse, Old Saxon, Old Frisian, Gothic skip, Danish skib, Swedish skepp, Middle Dutch scip, Dutch schip, Old High German skif, German Schiff), "Germanic noun of obscure origin" [Watkins]. Others suggest perhaps originally "tree cut out or hollowed out," and derive it from PIE root *skei- "to cut, split."
Now a vessel of considerable size, adapted to navigation; the Old English word was used for small craft as well, and definitions changed over time; in 19c., distinct from a boat in having a bowsprit and three masts, each with a lower, top, and topgallant mast. French esquif, Italian schifo are Germanic loan-words.
Phrase ships that pass in the night is from Longfellow's poem "Elizabeth" in "Tales of a Wayside Inn" (1863). Figurative use of nautical runs a tight ship (i.e., one that does not leak) is attested from 1965.