Old English wið "against, opposite, toward," a shortened form related to wiðer, from Proto-Germanic *withro- "against" (cf. Old Saxon withar "against," Old Norse viðr "against, with, toward, at," Middle Dutch, Dutch weder, Dutch weer "again," Gothic wiþra "against, opposite"), from PIE *wi-tero-, literally "more apart," from root *wi- "separation" (cf. Sanskrit vi, Avestan vi- "asunder," Sanskrit vitaram "further, farther," Old Church Slavonic vutoru "other, second").
Sense shifted in Middle English to denote association, combination, and union, partly by influence of Old Norse vidh, and also perhaps by Latin cum "with" (as in pugnare cum "fight with"). In this sense, it replaced Old English mid "with," which survives only as a prefix (e.g. midwife). Original sense of "against, in opposition" is retained in compounds such as withhold, withdraw, withstand. Often treated as a conjunction by ungrammatical writers and used where and would be correct. First record of with child "pregnant" is recorded from c.1200. With it "cool" is black slang, recorded by 1931. French avec "with" was originally avoc, from Vulgar Latin *abhoc, from apud hoc, literally "with this."
Having the usual accompaniment, that is, onions with hamburger, cream with coffee, etc: We ordered two coffees with, to go (1930s+ Lunch counter)