The word pretzel was borrowed in the early nineteenth century from the German word Brezel. The b to p switch you see here occurred because, in German, the b was aspirated (meaning that there was a short breath of air after it), but that was lost going into English, and an unaspirated b sounds very similar to a p. Going back to Old High German, Brezel is from brezitella, which probably comes from a Latin word looking like brachiatellus and referring to a similar kind of twisted pastry. This must have been thought to have a resemblance to folded arms, because brachiatellus comes from bracchium, meaning "arm". Finally, bracchium traces to the Ancient Greek word brakhion, which could also mean "arm" but more literally translates to "shorter" (from Proto-Indo-European mreg, "short").
Hello! I'm Adam Aleksic, a sophomore studying government and linguistics at Harvard University, where I co-founded the Harvard Undergraduate Linguistics Society. In addition to etymology, I also really enjoy politics, vexillology, geography, board games, conlanging, and law.