'All right, mate?" chirrups Stevie Wonder in a mockney accent last tried by Dick Van Dyke. He is tired, hardly surprising given it is 2.30am where he lives in California, but that doesn't stop him from acting his usual playful self. Nor does it prevent him from talking at length about his 50-year career, and the events that shaped it.

He's not one to hold back. Before long, he is vividly remembering the car crash in which he nearly lost his life. It was 1973, and the sedan in which he was travelling careened into a truck. His wounds were severe.

"It was on 6 August that I almost died in that car accident," he recalls. It was a key date for another reason. "It was also on 6 August – 1988 – that my son Kwame was born. Life is funny."

Does the crash remain the signal event of his life?

"It is significant," he replies, and it's a typical Wonder response, "but I was blessed to come out of it. God gave me life to continue to do things that I would never have done."

Principal among these was the electrification of modern soul that he effected on his extraordinary series of 70s albums. They have exerted a tremendous influence on musicians, from Michael Jackson and Prince in the 80s to rapper Drake and this year's most lauded new R&B star, Frank Ocean.

"Yeah, I like Frank," says Wonder, who sang the hook from Ocean's No Church In The Wild to the Odd Future sensation when he met him at a party recently. The feeling is mutual: reviews of Ocean's 2012 album, Channel Orange, drew comparisons with Wonder's music at its most expansive.

After being consigned to MOR-soul hell following the likes of I Just Called To Say I Loved You, Wonder – who next week headlines Bestival – is hip again. Is there anybody who doesn't like him?

"Heh," he chuckles, then pauses. "Well, there are those. But we don't like to think about that."

No, Wonder-haters are few. Maybe he's thinking of his early days. In Where Did Our Love Go?, a history of Motown, Nelson George noted the jealousy among staffers towards the 12-year-old-genius, even if detractors were soon silenced by his fabulous run of mainly self-penned hits: Uptight (Everything's Alright), For Once In My Life, My Cherie Amour and Signed, Sealed, Delivered.

Wonder in the early 60s. Photograph: David Redfern

In 1971, he released the transitional Where I'm Coming From, which along with Marvin Gaye's What's Going On was the first serious album from a label accustomed to singles. It was a brave departure from the Motown sound, with forays into psychedelia, baroque pop and folk-inflected soul.

"I had fun doing that album with [ex-wife] Syreeta," he says. "Berry [Gordy, Motown boss] said: 'Do your thing.'"

He recalls writing the song If You Really Love Me at the apartment of Laura Nyro, no stranger herself to the startling chord sequence. Fellow Motown songwriter Smokey Robinson, however, was unimpressed with his new direction after he saw Wonder on comedian Flip Wilson's TV show.

"I got a call from Smokey and he says: 'I didn't like your choice of material. I think it's really ridiculous.' I said: 'I don't give a "uh" what you think, or what anyone thinks!' That was my growing-up moment at Motown."

Hooking up with Malcolm Cecil and Robert Margouleff of electronic duo Tonto's Expanding Headband, Wonder pursued a radical synthesised context for his new soul vision. His purple streak continued with 1972's Music of My Mind and Talking Book, 1973's Innervisions, 1974's Fulfillingness' First Finale, culminating in 1976's double-LP (plus additional EP) treasure trove Songs In The Key Of Life. With their dazzling melodies and blend of gritty politicised funk and elegant ballads, these albums appealed to rock and soul fans alike.

He overreached himself on 1979's Journey Through The Secret Life Of Plants, a double concept album full of new age noodling, but he redeemed himself, critically and commercially, with 1980's Hotter Than July. And if his recordings since have been patchily received, there is consensus among music lovers that his golden age lasted longer than anyone's, Bob Dylan and the Beatles included.

Wonder is adamant that his heyday of exploratory music-making is not over, despite the fact that his last album, A Time to Love,only his fourth LP proper in three decades, was issued in 2005. "I'm still experimenting," he enthuses. "There's a new instrument I'm learning to play called the harpejji. It's between a piano and a guitar. I'm writing really different songs with it – I have so many. The question is, will they outlive me? Time is long but life is short."

Does Wonder, who has just turned 62, have a growing sense of his mortality? "I don't feel it," he says of time's marching. "I know it for a fact."

He feels a pressing need to achieve in non-musical spheres, and digresses to discuss gun crime, a subject on which he has been outspoken. "I'm concerned about how accessible guns are," he says. Is he referring to the "Batman shootings" in Colorado?

"No, I'm talking about in the hood," he replies. "That [Colorado] was also very sad, but this is an occurrence almost every week in various cities. But no politician wants to confront it. The right to bear arms? What about the right to live?"

Does he fear what happened to John Lennon could happen to him?

"I've had threats," he says, "but I don't put that energy out there because that's just craziness."

Can he feel the same connection to "the street" that he did in the 70s when he penned sociopolitical anthems such as Living For The City?

"Of course," he exclaims. "I travel and do stuff."

What's it like when he and his entourage sweep through town?

"I just focus on what I'm doing," he says. "If fans take pictures ... Every time I think about getting annoyed I remember how blessed I've been to have people who have followed my career."

Is he in touch with the young man who wrote, say, Superstition?

"Oh yeah," he replies, breezily. "I listen to him. And I make sure I feel the same way still."

Performing for Democratic presidential hopeful Barack Obama, 2007. Photograph: Stefano Paltera

Many of his best-loved songs were Nixon-era rebukes. These days, he supports the president. What is his view of rappers such as Jay-Z, said to be turning against "B-Rock"?

"Well," he sighs, striking a rare note of antipathy, "those who have turned against him, it's because they're ignorant or it doesn't serve their own interest, which probably has to do with money. But the reality is, your money is only as good as you're able to help others with it."

Even before his accident, when his music was at its most supersonically joyous, Wonder spoke in dread tones of an apocalyptic future, and of the ominous present presaging it. "It's the last days of life, of beauty," he declared, referring darkly to "all the horrors and hypocrisy in the world".

After the crash he became increasingly affirmative. But how do these times compare? Is he more optimistic now?

"I'm always optimistic, but the world isn't. People need to make a jump to a place of positivity but they put it all on one person to make it happen," he says. "It takes everybody. And the mindset has to be different. I mean, how do we have, in 2012, racism in the world?"

Did he assume that racism would be obliterated?

"It can't be obliterated until people confront the demon in the spirit," he says. No wonder one of his current roles is as a Messenger of Peace for the United Nations.

"You need to put your heart into making a difference," he says, proposing "an end to poverty, starvation, racism and illiteracy and finding cures for cancer and Aids" as just some of the jobs that need doing.

Doesn't he wish he could subvert his beatific image? Has the Messenger of Peace ever wanted to punch someone?

"No," he says patiently, as though to a child who has said something particularly dumb. "When you punch somebody it means you have let your ability to communicate out the gate."

Wonder mentions "the demon in the spirit". How has he managed to endure when his revolutionary soul peers – Marvin, Sly Stone, James Brown – succumbed to torment and temptation?

"First of all," he stresses, "I'm no better than the next person. But I've never had a desire to do drugs. When I was 21 I smoked marijuana, and I didn't like the way it made me feel. When I woke up the next morning I felt like I'd lost part of my brain."

Wonder has also seen the passing of younger talents: Michael Jackson, Whitney Houston, Amy Winehouse ...

"It's been a heartbreak," he says. "Obviously I knew Michael." In 2009 he broke down during a performance of Jackson's The Way You Make Me Feel. "I knew Whitney, too, and I understand Amy came to my concert in England a couple of years ago. I was thinking about us doing a duet – an old Marvin and Mary Wells song called Once Upon A Time. It would have been amazing."

Had he met Winehouse, would he have offered her words of wisdom, or would there have been no point?

"There's always a point," he says.

Recording We Are The World with Lionel Richie, Daryl Hall, Quincy Jones and Paul Simon, 1985. Photograph: AP

Wonder has never gone off the rails, although when I ask whether a movie version of his life would be a drama, a comedy or a tragedy, he says: "All of the above." Does he ever consider that it's his "disadvantages" – being born blind and black – that have made him what he is?

"Do you know, it's funny," he starts, "but I never thought of being blind as a disadvantage, and I never thought of being black as a disadvantage. I am what I am. I love me! And I don't mean that egotistically – I love that God has allowed me to take whatever it was that I had and to make something out of it."

Does he never allow himself an egotistical moment to survey his career?

"Nah," he says, "that's a waste of time. I enjoy listening to the stuff I've done, but that's it."

Is he a genius?

"No," he says, "I was just blessed to have ideas. The genius in me is God – it's the God in me coming out."

This summer, he met the Queen after performing at the jubilee concert in London.

"She was born under the same astrological sign as me: Taurus," he marvels. "It was wonderful meeting her."

When I suggest that, if anyone should have been bowing and scraping, it was the one who, by accident of birth, acquired enormous status and wealth, not the one who, by sheer hard graft, changed the course of popular culture, he disagrees.

"That's because you don't believe in the power and the spirit that is intangible but is all around us," he mildly scolds. "There has to be a higher energy power."

Nevertheless, Wonder is aware of his impact, and of those who have picked up his progressive soul baton, such as Ocean. Was he surprised that there could, in 2012, be a furore at the revelation that a rapper might be gay?

"I think honestly, some people who think they're gay, they're confused," he says. "People can misconstrue closeness for love. People can feel connected, they bond. I'm not saying all [gay people are confused]. Some people have a desire to be with the same sex. But that's them."

In 1974, US rock critic Robert Christgau described Wonder as "a sainted fool". He wrote: "I'm not saying he's a complete fool; in fact, I'm not saying he isn't a genius. But you can't deny that if you were to turn on a phone-in station and hear Stevie rapping about divine vibrations and universal brotherhood ... you would not be impressed with his intellectual discernment." Certainly, with Wonder, you have to suspend your cynicism. But he has to contend with being narrowcast still.

"I've never said I was a soul artist or an R&B artist," he responds when I venture that the music he made in the 70s was a soul version of progressive rock. "They're just labels. When you're soul it means black, when you're pop it means white. That's bullshit. If it's good, it's good. It's like that old Jerry Reed song: 'When you're hot, you're hot, when you're not, you're not.'"