Old English wið "against, opposite, from, toward, by, near," a shortened form related to wiðer, from Proto-Germanic *withro- "against" (source also of 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," suffixed form of *wi- "separation" (source also of Sanskrit vi "apart," Avestan vi- "asunder," Sanskrit vitaram "further, farther," Old Church Slavonic vutoru "other, second"). Compare widow (n.).
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 (as in 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 African-American vernacular, recorded by 1931. French avec "with" was originally avoc, from Vulgar Latin *abhoc, from apud hoc, literally "with this."