Warning: contains anatomical references.
Those who've denied the insidious creep of genital membranes into modern religion should take heed. The hymen (yes, that mucous membrane business) shares an etymology with the hymn (as in, "All things bright and beautiful"), and, frankly, creatures great and small are shocked.
It begins with Hymenaeos, the Greco-Roman (wrestler, perhaps?) God of Mawidge. Marriage, though concerned, of course, with the mutual procuration of stainless steel espresso machines, the dividing of supermarket dairy cabinet prefabricated dessert two-packs, and the canoodling of toothbrushes next to the bathroom sink, is also widely associated with, for better or worse, (quiet please) sex. I cannot comment on the extent to which this association is grounded in statistical realities, not having read the Kinsley Report, but there's no denying, in the popular imagination, sex and marriage go together like a horse and carriage. Likewise, I'll withhold any analysis of why it is part of a gel's genitalia, and not, say, the outermost follicle of the greater dangling left bollock, that is named after ye God of Marriage, but I'm sure you can work it out yerselves. Insert pertinent feminist inflections to taste.
Meanwhile, old Hymenaeos, being the God of Marriage and all, is the object of wedding songs Greek and Latin. They traditionally go something like "Io, io, Hymen, Hymenaee! Io, io!" (here's where a good lyricist comes in handy) and they're known as hymens. The hymens are sacred songs, and so hymen gradually comes to designate sacred songs of any stripe, and somewhere loses a vowel and becomes "hymn". QED.
(This post brought to you with the invaluable assistance of the Oxford English Dictionary, my bedfellow of preference.)