Of all the incarnations of Leonard Cohen's song "Hallelujah" – and there have been many – the X Factor winner's version will raise the most eyebrows. One of the greatest songs of all time, it has a long and varied history dating back to 1984 – long before any of the talent show's remaining finalists were even born.

It had a difficult beginning. The story goes that Cohen took two years to pen the song, writing at least 80 verses that were eventually distilled into the six that make up his original. He said: "I filled two notebooks and I remember being in the Royalton Hotel [New York], on the carpet in my underwear, banging my head on the floor and saying, 'I can't finish this song.'" Thankfully, he did.

Cohen has often recalled meeting Bob Dylan in the Eighties. Dylan performed "Hallelujah" in concert at the Montreal Forum in 1988 and he asked Cohen how long it had taken him to write it. Cohen said two years, although it actually took slightly longer ("I lied because I was ashamed to tell him how long it really took"). When Cohen turned the question back on Dylan, asking him how long "I and I" had taken him to write, Dylan replied: "About 15 minutes."

Download the new Independent Premium app Sharing the full story, not just the headlines

Though Cohen discarded many verses as he went along, legend goes that 36 verses out of 80 remained. There were two versions of Cohen's song, the heavily spiritual first version on his 1984 album Various Positions, and the second, more obviously erotic version, recorded at a live show in 1988 and appearing on his 1994 album Cohen Live.

The later version omitted the biblical references of the original, focusing on the chorus and final lines. The first was filled with Old Testament references, beginning with King David's harp-playing to soothe King Saul (the "chord that David played") and his later seduction by Bathsheba. The title itself is the Hebrew word meaning "glory to the Lord". In its six verses it wraps up all the themes pertinent to human existence: love, sex, desire, death, loneliness, weakness, religion, failure, forgiveness, redemption, mercy – and, of course, the act of songwriting itself.

Cohen said of the song: "The song explains that many kinds of hallelujahs do exist, and all the perfect and broken hallelujahs have an equal value. It's a desire to affirm my life, not in some formal religious way but with enthusiasm; with emotion. I know that there is an eye watching all of us. There is a judgement that weighs everything we do."

But the song that became widely accepted as one of the best of all time did not become so via Cohen's understated original. When Dylan heard Various Positions, he commented that Cohen's songs were becoming more like prayers. The Canadian songwriter had started as a poet and novelist and his original ballad is half-spoken in his deep voice.

But it was a later version by John Cale, a former member of The Velvet Underground, that set the modern template. Cale had heard Cohen's new "Hallelujah" in 1988 and asked him to send him all the verses. Cohen faxed over just 15. Cale took Cohen's sparse gospel-tinged ballad, reordered the verses and arranged the song for piano. For years, Cale sang his version live before making a studio version for the 1991 tribute album I'm Your Fan, which then appeared on his live album Fragments of a Rainy Season a year later and would become Jeff Buckley's arrangement.

It was Buckley's version on his 1994 album Grace that took the song into the canon. It was arguably the highlight of the album. Injecting the emotion of his trembling multi-octave vocals, the build-up to the line "Love is not a victory march/ It's a cold and it's a broken hallelujah" is devastating. Buckley's death by drowning at the age of 30 would immortalise a now wholly poignant song, and it was Buckley's "Hallelujah" that was ranked as one of Rolling Stone's 500 Greatest Songs of All Time, not Cohen's. And like the best cover versions of other great songs, with the fame Buckley brought "Hallelujah" you'd almost be forgiven for thinking he was the writer. Buckley omits two of Cohen's redemptive verses; he called his version an ode to "the hallelujah of an orgasm", even saying: "I hope Leonard doesn't hear it." He needn't have worried. Cohen has allegedly acknowledged it to be his favourite version.

"Hallelujah" is not Cohen's most covered song; that honour goes to "Suzanne". But it has been covered by more than 100 artists in various languages, many of which have made it on to record. It is also his most famous song thanks to Buckley's rendition. That Cohen himself penned two versions of it and had a surplus collection of verses left the song open to interpretation, resulting in the numerous covers that followed. Rufus Wainwright's rendition, which emulated the emotive delivery of Buckley's, though less subtle, and in which he substituted "holy dark" for "holy dove", brought the song back to the mainstream – and to a new, younger audience – when it featured, believe or not, in the film Shrek. Wainwright said: "It's an easy song to sing. The music never pummels the words. The melody is almost liturgical and conjures up religious feelings."

kd lang recorded it on Hymns of the 49th Parallel and still performs it live, while it has become a signature set-closer for Brandi Carlile. These join Jon Bon Jovi, Kathryn Williams, Allison Crowe, Damien Rice and Willie Nelson. Bono's bizarre ambient breakbeat version was recorded for Tower of Song, an all-star tribute to Cohen in 1995 (featuring covers by Tori Amos, Sting, Suzanne Vega and Willie Nelson). The classical singer Katherine Jenkins includes a version on her album Sacred Arias.

BBC Radio 2 recently marked the 25th anniversary of the first recording of the song. Presenter Jeremy Vine said: "It is one of those classic songs that is sung better by the people who didn't write it, because it's so open to interpretation. For me, I'd take the Kathryn Williams version over Jeff Buckley's by a shade. Best line, 'Like how to shoot somebody who outdrew ya' – and worst probably, 'The fourth, the fifth/ The minor fall, the major lift' because that is so self-consciously a muso referencing his own craft. We played all the different versions on my show a couple of years back and it took off with the listeners in a big, big way, because the whole scope of the song is awesome: it is in a category of one."

Cohen's publicist still gets sent new versions (the latest in Welsh and Afrikaans) by musicians hoping to see them passed on to Cohen for approval. It really is a song of universal appeal.

It's this ability to tap into the emotions that has led it to become a song to accompany sad moments on television shows. On the teen soap The OC it featured three times, including the moment when the beautiful Marissa (Mischa Barton) dies in Ryan's arms. Cale's version is on the soundtrack of Scrubs and features in the 1996 film Basquiat. Many fans of the song will have discovered it via The West Wing.

As for an X Factor special, it sounds about as appropriate as the fans who swayed in a "Sweet Caroline"-esque singalong at Glastonbury. It's a song that represents timelessness, and if it means that Buckley's version, or even Cohen's original, make their way back up the charts, that can't be a bad thing.

Which are the best and worst cover versions? Jimi Hendrix doing ‘All Along the Watchtower’? Madonna’s ‘America Pie’? Join the debate by clicking here.