Latin bi- comes from earlier Latin dui-. It’s related to Greek di-, coming ultimately from Proto-Indo-European (PIE) *dwís ‘double’, a form of *dwóh₁ ‘two’ (from which the English). Latin compounds with bi- in them started entering English in the 13th century, and around the 17c new English words start being coined with the prefix.
English ‘by’ [baɪ̯] comes from Old English bī [biː], from Proto-Germanic *bi. It has the same origin as be- in words like ‘besides’. The OED relates it to Latin ambi-, Greek amphí- ‘by, near, about’, which trace back to PIE *h₂m̥bʰi ‘around, about’. The unsourced Wiktionary theory relates it instead to Greek epí ‘on, at, near’, which would be from PIE *h₁epi ‘same’.
In either case ‘bi-’ and ‘by’ are clearly unrelated, in both meaning and history. bi- ‘double’ comes from a word related to ‘two’ with a PIE /d/, and by comes from a simplification of some PIE word for ‘at’ or ‘around’ with a medial /bʰ/ or /p/.