There is a moment towards the end of Die Meistersinger that sums up Wagner's genius as a dramatist. The boorish town clerk Beckmesser exits. Hans Sachs, shoemaker and poet, ruminates on a trap he's just set for Beckmesser; and the orchestra circles, as if in a holding pattern, around a melody symbolising futile, manual work. Then Eva comes in. She's Sachs's god-daughter, 20 years younger, beautiful – but in love with Walther, a kind of late-medieval hipster, who Sachs is trying to help. It's just a scene change: exit Beckmesser, enter Eva, as the stage direction says "richly dressed in gleaming white, rather sad and pale". Except the stage direction doesn't need to say anything: the music does. As Eva appears, the orchestra soars through a complex of musical themes signifying love. But whose love? And for whom?

Martina Welschenbach, who's currently playing Eva at the Deutsche Oper in Berlin, has no doubt: "It's an amazing moment. Sachs looks at her, she looks at him and they can't break their gaze. Just a second before she starts singing, she realises it's all too late. I think she comes in with the idea that, 'maybe he's going to kiss me, or something' but she turns away and it's quite clear. It's only a few bars of music but it's so strong. There's such a tension. I can really feel it.

"Eva has, half-jokingly, offered to marry Sachs as a way of escaping Beckmesser's attentions. Thanks to the music we know that this is what Sachs is longing for: he is secretly in love with her. It is a dramatic turning point whose intensity and psychological depth would be impossible to achieve with the spoken word alone. And in the course of the five-hour drama Wagner's music creates hundreds of such moments.

Wagner's Die Meistersinger was Hitler's favourite opera: the führer could whistle its overture note-for-note, and made attendance of it compulsory for Nazi functionaries at the Nuremberg rallies. The antisemitism implicit in the depiction of Beckmesser caused Jews to storm out of its first performances. Yet its dramatic truth goes a long way to answering a question that gnaws at me every time I listen to Wagner: why can this antisemite tear my heart to pieces?

In this, the year of his bicentenary, tens of thousands of opera-goers will sit spellbound by Wagner. They will be faced with a choice: to ignore the politics and simply wallow amid the musical excess, or to confront the politics, preparing themselves to be disturbed. I prefer the confrontation. For me it began 30 years ago, the day I watched the bourgeois order destroyed in Patrice Chereau's production of Gotterdammerung.

Chereau's industrial-era staging of The Ring Cycle was seen as radical at the time, but it only made overt what George Bernard Shaw had noticed 90 years earlier: that the Ring is actually about "shareholders, tall hats, white-lead factories and industrial and political questions looked at from the socialistic and humanitarian points of view". It is an allegory of capitalist society doomed by greed and of humanity redeemed by love.



Reading this on a mobile? Click here to view

Wagner began the Ring under the influence of Ludwig Feuerbach, the utopian socialist philosopher criticised by Marx and Engels for "elevating the liberation of mankind through love above the emancipation of the proletariat". With the defeat of the 1849 revolution in Dresden, and Wagner's exile to Switzerland for his role in it, the Ring became the vehicle for three, linked, projects: the formation of a German national theatre based on shared myths; the creation of the so-called "total artwork" from a fusion of poetry, music and drama; and the liberation of German culture from the "Franco-Judaic" influences that Wagner believed had caused the defeat of the revolution.

Thomas Mann, in 1933, famously pleaded against making anachronistic judgements about Wagner's nationalism, and that's fair enough. But there is no getting around the fact that, for much of the German left in the 1840s, the struggle for what they called a "purely human" future, free of the alienation imposed by capitalist society, meant a struggle against "Jewishness".Wagner's antisemitism was neither private, casual or incidental. It is tangible in the Ring – and not just in the portrayal of the dwarves, Mime and Alberich. Wagner scholar Paul Lawrence Rose insists that, in the allegorical scheme, "Jews are the agent of law, inhibiting the freedom to be human; they're the agents of capitalism, reinforcing repression; and domination, that's seen as a Jewish thing – the Ring gives the holder power over the world."

But it's not the antisemitism that, for me, makes the Ring a flawed and ultimately broken work of art. It is the relationship within it of Wagner's two great preoccupations: myth and psychology. The more immersed I've become in it, the more the Ring feels like a real human drama trapped inside a story about dwarves and dragons, and trying to escape.

Fortunately, halfway through writing it, Wagner himself escaped: in 1857 he put aside the score of the third instalment, Siegfried, and would not return to it for 12 years. He had encountered two, new, life-changing influences: Schopenhauer, whose philosophy would replace his utopian radicalism of the 1840s; and 27-year-old Mathilde Wesendonck, the wife of his patron, with whom he had fallen in love. Under their influence Wagner would create three profoundly human dramas – Tristan, Die Meistersinger and Parsifal – which for me stand in a different category to the Ring.

'There's a surfeit of love in Wagner (pictured). It comes at you from all angles.' Photograph: Hulton Archive/Getty Images

Schopenhauer's impact is well documented. His main proposal, that suffering originates from our will to live, our craving, and that happiness can only be achieved by "cheerful acceptance" of one's lot, provided Wagner with an organising thought that would pervade all his subsequent work. Once he could say to himself, at the head of every score, "the moral of this tale is the acceptance of one's lot," Wagner became free to portray human beings engaged in the precise opposite: his characters defy conventional morality, they pursue illicit love, they break and remake social contracts.

Because Wagner destroyed most of his correspondence with Mathilde, there's been a tendency to underplay her influence. But close study of the five songs he wrote to accompany her poetry shows the relationship marked a creative turning point.

The Wesendonck Songs are the only music Wagner wrote to somebody elses's lyrics. And the music suddenly shimmers not just with eroticism and desire, but with an aesthetic quality we associate with early modernism.

The soprano Susan Bullock who has recorded the songs says: "I think the subject of the songs is revealing: we have the angel, pain, dreams, stop the world I want to get off, I need peace … there is a lot that talks about somebody who is torn, somebody who's deeply in love. And those songs were then transformed into Tristan, the greatest love story."

Tristan und Isolde is rightly regarded as a turning point in music history; its opening chord sequence points to the atonalism and extended tonalities of the 20th century. Equally important is what it achieves dramatically: it is the first Wagner opera in which psychological truth obliterates and subsumes the mythical. Not only are the gods absent, and fate too (and dwarves and dragons); religion itself, and even morality, are absent. With Tristan, Wagner achieved a level of psychological realism about love, sex and infatuation so shocking he told Mathilde that, if the opera were ever performed properly, it would very likely be banned.

In the Act II love duet the music subtly portrays Tristan's sexual capture by Isolde. They are smitten because of the love potion, but something yields within Tristan by the end of it: his sexuality changes from that of the impatient, manly knight to something something entirely affected by Isolde: he is in the world of perfume, rose petals and silk sheets that, as Dreyfus's book reveals, was Wagner's private world with Mathilde.

Bullock, says: "I think Isolde is always the leader. She is coaxing Tristan during the Act II duet. He doesn't want to talk about it. He is detached. She is determined to make him talk and express himself." After Tristan Wagner could have turned back to the Ring. Instead he composed Die Meistersinger, whose musical language – different though it is from Tristan – is designed to support the unraveling of another love triangle. And if Tristan is an extended riff on the ecstasy of love and dying, Die Meistersinger is about the ecstasy of belonging.

But that, of course, is where the political trouble re-emerges. Sachs's mission in Die Meistersinger is not only to unite Eva and Walther; it is to set a community to rights. In the process, though Walther gets the girl, Sachs himself gets something else: he becomes working-class hero for the city's people. They adoringly belt out his songs even as he tries to reason with them, ecstatically proclaiming "heil Sachs".

As the drama progresses, it is the idealised German volk of Nuremberg who take on the role of protagonist. If you add to that Beckmesser's music and language, which Paul Lawrence Rose alleges are clear parodies of Jewish cantorial melody, and of Yiddish, the challenge it poses for the modern producer become stark.

Curt Rosler, dramaturg at the Deutsche Oper explains how the current Berlin production solves this problem:

"There are two sides to Wagner. One side was misused to create a German national consciousness: in this theatre, in the 1930s, they held up SS banners in the third act of Die Meistersinger. But there is the other side – this struggle for democracy which was part of his life. The challenge is to bring forward the other side."

Rosler's production, originally designed with director Gotz Friedrich, opens with a landscape of medieval Nuremberg superimposed on to a photograph of the ruins of the city in 1945. "German nationalism leads to this", is the uncompromising message.

And Rosler believes the dramatist's main ally in undermining the racist Wagner is Wagner himself: the humanist Wagner who inhabits the deep structure of the music.

"We rescue the work from antisemitism with Beckmesser," says Rosler. "He's not a comic figure - he's a human figure. He also experiences the sorrow and futility that the heroic characters feel. And it's there in the music. Wagner actually wrote it that way."

This, for me, is the starting point for any modern engagement with Wagner. The idea that there can be, inside the music, something at odds with the intent: whether it be antisemitism, or the philosophy of self-denial and death-obsession Wagner learned from Schopenhauer. Inside the music is something human, complex and true. To find it, we have to confront everything in the work that is the opposite.

In the last act of Die Meistersinger, once Eva has got over her moment with Sachs, and been united with Walther, she finds the courage to tell Sachs: "You were not wrong. If I had a choice I would have chosen you. But it's me who's been chosen - by something else: the unknown torment of love."The music, searing and overwhelming, seems to quote from Tristan. "In the last act, from the moment I start singing to the last note of the scene, everything is amazing," says the Deutsche Oper's Martina Welschenbach. "I have goosebumps on my skin. It's such a great physical feeling to open your voice and let all the emotions out on top of this beautiful orchestration."

And this goes to the core of my original question: why does the music of a man who thought he was promoting the racial purity myth go on tearing our hearts to pieces?

The answer is: there's a surfeit of love in Wagner. It comes at you from all angles and in all forms. Whatever he thought he was telling us, Wagner was actually telling us: love who you want, regardless of social norms, and if you must suppress your feelings, do it knowingly, and for a higher reason.

It is this that makes Tristan and Die Meistersinger essential modern dramas and most of the Ring, where fate and accident are the excuse for the love transgressions, essentially pre-modern.

In 1933, as he fought to wrest ownership of Wagner from the Nazis, Thomas Mann argued that beneath the trappings of reaction, Wagner's idiom was "entirely revolutionary": "This man of the people, who all his life set his face resolutely against power, money, violence and war, and who sought to build his Festival Theatre for a classless society … let no spirit of pious or brutal regression claim him for its own, but all those whose efforts are directed towards the future".

That was the old, liberal defence of Wagner, but I don't think it stands the test of time and scholarship. There is a much better one: value the humanism and psychological depth that makes the three late operas timeless masterpieces. Understand the Ring for what it is: a giant, ambitious monument cast from a mould that got broken halfway through.

• Paul Mason's two-part documentary Wagner: Power, Sex and Revolution, begins on BBC Radio 4 on Tuesday 30 April