The Oxford English Dictionary dates the phrase mind-boggling to 1955 and defines it to mean “overwhelming,” “startling” or “amazing.” The word boggle however is a little older; 400 years older. Originally it wasn't people who were boggled but horses. A boggled horse was a horse that had been spooked by something their drivers or riders couldn't see. The reason such a spooked horse was called boggled was because people were superstitious and they thought what might be spooking the horse might be a ghost or supernatural spirit.
These mythological beings went my many names including bogey-man and boggard , which was one of the breeds of little nasties in Harry Potter.
A related beast of superstition is the bugbear. Now we think of a bugbear as something annoying, a thing that bugs you, but originally a bugbear was thought to be a supernatural creature in the form of a bear that specifically preyed on children.
That first 1955 usage of mind-boggling was by Erich Fromm in a book called The Sane Society .
He called American culture of the 1950s mind-bogglingly banal and stiflingly homogenous.
According to one review his recipe for success called for individual development and democratic self-expression within the context of a vibrant communal life, including relatedness; transcendence; rootedness; identity; and a framework of orientation and devotion. Which itself sounds pretty supernatural and mind-boggling.