Bologna comes from Bologna sausage--that is, sausage from the Italian city of Bologna. This much is similar to hamburger from Hamburger steak, and wiener from wienerwurst, steak and sausage from the cities of Hamburg and Vienna (Wien in German).
In bologna the [ony] ending is unusual enough to English-speaking ears that the [y] gets lost and the final schwa converges with the very common <y> or <ey> ending, spelling an unstressed long <e>.(Notice that the original wiener developed the variant wienie.) Over time variant spellings developed to more accurately reflect the new pronunciation: boloney, baloney.
It appears that early on bologna sausage had a bad reputation. As a 19th century cook book put it, "Real Bologna sausages labour under the imputation of being made of asses' flesh." As the pronunciation and spelling of bologna changed, so did its meaning, expanding to be used to mean a stupid or clumsy person, an idiot, someone who is worthless, a slut or prostitute--and finally humbug or nonsense. A 1902 quotation from A Dictionary of American English can perhaps help explain the route to the latter: "A man can't have his head . . . stuffed full of odds and ends like a bologna sausage, and do his work right." Another suggestion is that there was a felt parallelism with the Irish blarney.
So today we have the spelling <bologna>, referring to the sausage, pronounced [b'lon.y] and [b'lo.ne], and the spellings <baloney> and <boloney>, sometimes used to refer to the sausage (much to the dismay, one would imagine, of Italian delicatessen owners), but more often referring to the humbug.