Especially in the phrase the mind boggles, the verb boggle means to be astonished or baffled when trying to imagine something.
The primary meaning of this verb was to start with fright, originally with reference to horses; in fact, it is probably related to the nouns bogle and bogey, denoting an evil spirit, such as horses are reputed to see.
The verb boggle is first recorded in Seauen bookes of the Iliades of Homere, prince of poets (London, 1598), a translation by George Chapman (circa 1559-1634), English poet and playwright, of the Iliad, traditionally ascribed to Homer, Greek poet of the 8th century BC:
So Tydeus’ son assail’d the foe; twelve souls before him flew;
Ulysses waited on his sword; and ever as he slew,
He drew them by their strengthless heels out of the horses’ sight;
That when he was to lead them forth, they should not with affright
Boggle, nor snore [= snort], in treading on the bloody carcasses;
For being new come, they were unus’d to such stern sights as these.
In All’s Well, that Ends Well (Folio 1, 1623), the English poet and playwright William Shakespeare (1564-1616) makes the King of France use boggle figuratively when he says to Bertram, regarding the ownership of the ring:
You boggle shrewdly, euery feather starts you.
The phrase the mind boggles is relatively recent, since the earliest instance that I have found is from The Daily Telegraph (London) of Saturday 7th April 1883:
Last night a very remarkable and valuable paper, setting forth “The Historical Development of the different Settlement Systems of India,” was read before the Society of Arts. The author of this elaborate disquisition, Mr. William George Pedder, was himself, when he served the Bombay Government, a distinguished revenue officer, bred up in the best school, intimately acquainted, by close personal experience, with the land settlement system of the Bombay Presidency, and by study with the systems of Madras, Bengal, and the great Northwest. […] It is true, undoubtedly, that “the most important fiscal and administrative operation of Government in India is what is called the settlement of the land revenue—that is, the decision of its amount and who is to pay it;” and that this source supplies the largest tributary stream to the Imperial Exchequer. The bigness of the fact makes a profound impression; but, as a rule, and certainly so far as the public is concerned, little further is ever learned, because the Western mind boggles over zemindars¹ and ryots², malguzars³ and talugdars⁴, and the infinite varieties which commingle with and qualify the arrangements suggested by the mention of these names. How they came into existence, what functions they perform, the reasons why there are such divers systems, what great changes have occurred from time to time over hundreds of years, Mr. Pedder undertook to explain in general terms, and he thoroughly succeeded in a difficult task.
¹ zemindar: originally, a collector of the revenue from land held by a number of cultivators; subsequently, an Indian who held land for which he paid revenue direct to the British government
² ryot, or raiyat: a cultivating tenant
³ malguzar: a tenure-holder
⁴ talugdar, or taluqdar: a land-owner responsible for collecting taxes
The earliest occurrence of the adjective mind-boggling that I have found is from The Tatler & Bystander (London) of Wednesday 22nd April 1959, in which St. John Donn-Byrne reported from Paris on the international flower show called les Floralies:
The statistics of the Floralies are mind-boggling. Flowers worth some £450,000 will be on display in nearly 90,000 square yards of space, 2,000 of them being under glass. Exhibits in the international section will come from Japan, China, Brazil, Colombia and Iran as well as parts of Africa and from many closer countries. A million visitors are expected in the ten days of the show. Forty-five special aircraft have been booked from London and cut flowers will be replaced here by air during the exhibition. Other special aircraft will fly from New York and Bogota, Colombia.
The earliest instance of the noun mind-boggler that I have found is from the entertainment section of the Detroit Free Press (Detroit, Michigan) of Friday 17th February 1967:
Our mind-boggler of the week: Filmland’s movie producers want a union. Said one plaintive spokesman: “We feel the producers are being discriminated against by being denied benefits that are enjoyed by the other guilds.” Who says the rich and powerful don’t have feelings?