The story you may have heardPopularly derived from the Tower of Babel (Genesis 11:9), where God 'confounded the language'. The OED: 'no direct connexion with Babel can be traced'. The verb is imitative of infant 'ba-ba' sounds and has cognates across Germanic. Even Genesis's own pun, Babel ← bālal 'to confuse', is folk etymology: Akkadian Bāb-ilim means 'gate of god'.