One day in 1964 John Howard Griffin, a 44-year-old Texan journalist and novelist, was standing by the side of the road in Mississippi with a flat tyre. He saw a group of men approaching him. Griffin assumed the men were heading over to assist him but instead they dragged him away from his car and proceeded to beat him violently with chains before leaving him for dead. It took Griffin five months to recover from the assault. The attack was not random; the beating represented a particularly brutal form of literary criticism: Griffin was being punished for having written a book. Black Like Me, the book in question, had been published three years earlier in November 1961 and it had led to its author being both venerated and vilified. Griffin, a lantern-jawed and chestnut-haired white man, deliberately darkened his skin and spent six weeks travelling through the harshly segregated southern states of America, revisiting cities he knew intimately, in the guise of a black man. On the opening page Griffin set out the question he was attempting to answer: "What is it like to experience discrimination based on skin colour, something over which one has no control?" No white man could, he reasoned, truly understand what it was like to be black, because black people would never tell the truth to outsiders. "The only way I could see to bridge the gap between us was to become a Negro," Griffin writes. "I decided I would do this."

He visits a dermatologist who prescribes medication usually given to victims of vitiligo (a disease that causes white spots to appear on the patient's skin) and he supplements the medication with sessions under a sun-lamp and by shaving his hair and rubbing a stain into his skin. In one of the most powerful passages in the book Griffin describes the shock of seeing his new self in the mirror for the first time. "In the flood of light against white tile, the face and shoulders of a stranger," he writes, "a fierce, bald, very dark Negro glared at me from the glass. He in no way resembled me … I had expected to see myself disguised, but this was something else. I was imprisoned in the flesh of an utter stranger, an unsympathetic one with whom I had no kinship … I looked into the mirror and saw reflected nothing of the white John Griffin's past. No, the reflections led back to Africa, back to the shanty and the ghetto, back to the fruitless struggles against the mark of blackness."

Startled by how little of himself he recognises, Griffin sets off on his journey and is further shocked by how little he recognises of his own country: the man who shines his shoes every day does not recognise him, the restaurants he usually eats in are no longer open to him, and he has to plan ahead if he wants to use the bathroom or drink from a water fountain. White folks either treat him with extravagant politeness – when they are on the hunt for black girls or they want to inquire about his sex life – or they give him what Griffin describes as "the hate stare". "Nothing can describe the withering horror of this," he writes, "you feel lost, sick at heart before such unmasked hatred, not so much because it threatens you as because it shows humans in such an inhuman light. You see a kind of insanity, something so obscene the very obscenity of it terrifies you. I felt like saying 'What in God's name are you doing to yourself?'" Being exposed to the hate stare, witnessing racism from the other side, leaves Griffin sad and angry; he grieves at how "my own people could give the hate stare, could shrivel men's souls, could deprive humans of rights they unhesitatingly accord their livestock". He concludes that "the Negro is treated not even as a second-class citizen but as a tenth-class one."

Griffin's outrage at this injustice was rooted in his own life. He was studying in France at the outbreak of the second world war and joined the French resistance, helping to smuggle Jewish children to Britain. Having witnessed the consequences of racism against Jews he became more sensitive to the plight of black people in America. Griffin had been temporarily blinded during the war after being blasted with shrapnel. He recovered his sight two years before embarking on the journey he described in Black Like Me, and the book can be read as a reaction to the lessons he learnt while sightless. "The blind," he would later write, "can only see the heart and intelligence of a man, and nothing in these things indicates in the slightest whether a man is white or black."

Black Like Me was Griffin's effort to persuade America to open its eyes. The first extracts from the book were published by Sepia magazine, and immediately he found himself the target of hostile attention. He received death threats, and an effigy of him was hung in Dallas, his home town, prompting Griffin and his family to go into exile in Mexico, where he did further work on the book. When it was published, he criss-crossed the country delivering lectures on his experiences; Black Like Me was translated into 14 languages, sold more than 10m copies, was adapted into a film and is still taught in schools and colleges across the US.

I was 16 years old and in college when I first read Black Like Me. I can vividly recall the impact it made on me: as an Asian teenager growing up in the 1980s I felt like a second-class citizen. There wasn't any literature that I had come across that spoke directly to my experience and so I embraced the literature of black America. I read the speeches of Martin Luther King, Richard Wright's Native Son and Ralph Ellison's Invisible Man, but Black Like Me struck an especially powerful chord partly because of Griffin's rage at the injustice of racism. In my own case, Black Like Me was not prophetic. Does it have any relevance 50 years after it was published?

Today the idea of a white man darkening his skin to speak on behalf of black people might appear patronising, offensive and even a little comical. Griffin felt that by blacking up he had "tampered with the mystery of existence", which sounded profound when I read it at 16, but now seems typical of Griffin's rather portentous prose, which occasionally makes one doubt the credibility of what he is describing. Would the doctor who administered the medication really have told him, on shaking his hand and waving him goodbye, "now you go into oblivion"? Later Griffin notes that when he sits down to write to his wife, he finds he is unable to do so: "The observing self," he recalled, "saw the Negro write 'Darling' to a white woman. The chains of my blackness would not allow me to go on." This, to me, lacks plausibility. Other questions emerge in the rereading: how is it that a 39-year-old white man can pass himself as black simply by darkening his skin and shaving his hair? Did no one notice his Caucasian features and become sceptical of the white man with weirdly dark skin? It is also striking how confidently Griffin seems able to inhabit the black mindset and speak for all black men, within, it seems, only days of starting his journey. Despite these misgivings, Black Like Me remains for me a brutal record of the indignities suffered by blacks in segregated America; it is also a reminder of how, in some respects, things have progressed.

Three months before its publication, Barack Obama was born in Hawaii. It is fascinating to speculate on Griffin's response had he been told, while on his odyssey through the segregated south, that a baby boy born to a Kenyan man would within 50 years be president of the United States. Obama's occupancy of the White House is, one could argue, emphatic proof that the world depicted in Black Like Me is history.

Obama's mother was white – but he made an explicit decision, which he describes in his memoir Dreams From My Father, to embrace a black identity. This self-conscious immersion into blackness led him to move to Chicago, to become active in the church, to familiarise himself with the canon of black literature and the civil rights movement so that he could claim his presidential hopes represented the fulfilment of the civil rights dream. Obama's case is of course different to Griffin's, but in one sense he, too, was not born black – he became black.

The similarities between Obama and Griffin are not, however, the primary reason why Black Like Me still speaks to us from a distance of 50 years; it resonates because its true topic is not race but humanity. Today in the US and elsewhere, Muslims have replaced blacks as the minority who are demonised, stereotyped and dehumanised. "To be a Muslim in America now is to endure slings and arrows against your faith," a recent cover story in Time magazine declared, "not just in the schoolyard and the office but also outside your place of worship and in the public square, where some of the country's most powerful mainstream religious and political leaders unthinkingly (or worse, deliberately) conflate Islam with terrorism and savagery."

Look at the footage of the protests against the inaccurately dubbed "Ground Zero mosque" – the expressions on the faces of the protesters seem eerily familiar. The footage may be in colour, but it brings to mind grainy black and white archive film of protests against integration. The hate stare, described so starkly by Griffin, scarred the faces of these protesters. There is a man with a black father in the White House, but there is also another black man, Herman Cain, who is seeking the Republican nomination to become the next president, who has said that any Muslim serving in his administration would be forced to take a loyalty test.

"The Negro. The South. These are details," Griffin wrote in his preface. "The real story is the universal story – one of men who destroy the souls of other men. It is the story of the persecuted, the defrauded, the feared and detested." As long as one group persecutes, fears and detests another, Black Like Me will, sadly, remain essential reading.

Black Like Me: 50th Anniversary Edition is published by Wings Press (£15.93).