He may be an evangelical bishop, but you do have to wonder how much Christian art the mayor of Rio de Janeiro has seen. Marcelo Crivella ordered an Avengers comic book to be removed from a book festival, because it featured two men kissing – a move that triggered a dramatic response from Brazil’s biggest newspaper, Folha de S Paulo, which reproduced the image on its front page, to highlight this attempt at censorship.

The mayor was so incensed by Avengers: The Children’s Crusade, he insisted it be given a black plastic wrapper. In a video posted on Twitter, he said it was not right for children “to have early access to subjects that do not agree with their ages”. But to find fault with this kiss is not just bigoted. It shows an ignorance of the origins of same-sex kissing in art.

For it was Christian artists who pioneered the gay kiss. Long before Dmitri Vrubel portrayed Communist leaders Leonid Brezhnev and Erich Honecker snogging on the Berlin Wall, or Banksy stencilled his Kissing Coppers on a pub wall in Brighton, it was Catholic art that first explored the joys of men kissing men. Rather than trying to censor Marvel, maybe Crivella should turn his easily offended eyes to the Sistine Chapel in the Vatican. For here, at the very heart of the Catholic world, Michelangelo portrayed men kissing, nearly 500 years ago.

In his fresco of the Last Judgment, the souls of the blessed are shown embracing and kissing. Those souls are male and muscular, and some of their smooches are anything but chaste: they hold each other in strong arms, look into each other’s eyes and passionately put mouths to mouths.

Facebook Twitter Pinterest Anything but chaste … detail of The Last Judgment by Michelangelo in the Sistine Chapel, Rome. Photograph: Alamy Stock Photo

Michelangelo was known, as he acknowledged to his biographer Ascanio Condivi, to love the male body, and was accused of turning the Sistine into a “bathhouse” with all his male nudes. It is time the church acknowledged the central place of homosexuality in his art. A fervent Catholic, Michelangelo was also a philosophically inclined poet whose writings try to reconcile christianity with his sexuality. In poems addressed to his beloved Tommaso dei Cavalieri he argues that by loving male beauty he adores God. The kissing couples in the Sistine Chapel are his ultimate defiance of prejudice. These men express their love openly and proudly – in the house of God. It would do today’s church, as well as the mayor of Rio, a lot of good to acknowledge and embrace the gay message of the greatest of all Catholic artists.

Michelangelo could do this because Renaissance Italy had a surprisingly modern understanding of sexual identity. As early as 1304, Giotto portrayed an incandescent moment between Judas and Christ in his frescoes in the Arena Chapel in Padua. As Judas comes in with his lips pursed to plant a kiss on Jesus’s mouth, the Lord looks straight into his eyes with blazing intensity. This is a kiss of betrayal, the sign to arrest Christ – but it is astonishingly intimate.

Facebook Twitter Pinterest A fine artistic tradition … the illustration of Wiccan and Hulkling from Avengers: The Children’s Crusade. Photograph: Jim Cheung/Marvel

The look in Christ’s eyes is not just angry or condemnatory. It is also loving and accepting – and touched with passion. Giotto must have seen men kiss, or kissed men himself, to paint this. And it was not in some kind of pre-modern, pre-sexual way. For Giotto’s contemporary Dante writes explicitly of men who love men in his Christian epic The Inferno. True, the poet meets these men in Hell. But they include his own poetry teacher Brunetto Latini, towards whom he feels nothing but gratitude and love for “that sweet image, gentle and paternal, / you were to me in the world when hour by hour / you taught me how man makes himself eternal.” The same lucidity with which Dante describes gay identity in The Inferno gives Giotto’s 700-year-old masterpiece its erotic frisson.

Lesbian kisses took longer to enter the artistic mainstream, undoubtedly because so few women got the chance to become artists before recent times. But in late 19th-century Paris, Henri Toulouse-Lautrec lived among dancers and sex workers in Montmartre and sympathetically showed their real lives. In his pastel In Bed: The Kiss, he depicts two of his friends sharing a loving and tender kiss.

The fact that same-sex desire was so little spoken of in many times and places left scope for fascinating ambiguities. “Kiss me Hardy,” says Nelson as he lies pale and dying on the Victory, a moment captured in paintings by Benjamin West and many others. But what did he mean by it? The fact that artists avoided the actual kisses Hardy gave his close friend suggests people were not so innocent of its implications after all, and it has been argued that Nelson and Hardy were lovers.

Marvel’s gay kiss is part of a great artistic tradition that goes back to Giotto and Michelangelo. Christianity needs to embrace this loving heritage, not deny it.