Balaam was a prophet of the Gentiles. The lines which Robert quotes occur when Balaam is on his way to enact the king of Moab’s instructions to curse the Israelites. This mission enrages God and he sends an angel down to deter the prophet. Balaam is initially blind to this divine apparition. His donkey, however, is more perceptive and swerves out of the way. Balaam, frustrated with the donkey, threatens her thus: “I would there were a sword in mine hand, for now would I kill thee” (Numbers 22:29).
Robert’s uncharacteristic identification of himself with a worshipper of Baal is rather interesting: it suggests that his biblical knowledge is not matched by an ability to interpret correctly, reflecting the myopic solipsism that warps his worldview generally. That Balaam fails to see the angel of the Lord, meanwhile, prefigures Robert’s own neglect of the warnings of the divine messenger who appears to him later in the novel (see p. 160-1).