Saber (Spanish for “to know”, in the sense of “knowing a fact”–not “knowing a person”) comes from the Latin sapere, meaning “to taste.” I guess you can taste a fact more easily than a person!
From the same Latin root, we get (via French) the English word… sage. Sagacity is a form of wisdom — which is a form of knowledge.
The s-b to s-g mapping is clear, and the -b- and -g- have similar soft sounds.