Middle High German. By surface analysis, wo (“where”) + mit (“with”). Akin to archaic English wherewith.
Practice speaking and memorizing "womit" and many other words and sentences in German.