James Bond is a survivor.

The chauvinistic secret agent made his 1962 screen debut at the height of the Cold War, with the pneumatic Honey Ryder as his glamorous female accomplice. Yet in the equality-minded post-Glasnost world of 2012, his appeal remains undiminished. The imminent release of Skyfall, the 23rd movie in the Bond franchise, is in itself testament to 007's extraordinary staying power, given the recent financial woes endured by backers MGM.

What is his secret? How has the legend endured a half-century of cultural and political change? And, given the height of expectations riding on this 50th anniversary movie, can Skyfall deliver? The answers lie, at least in part, with 44-year-old Daniel Craig, the charismatic star who plays Bond for the third time in Skyfall, which is directed by the Oscar-winning (for American Beauty) Sam Mendes.

We meet in London's Claridges Hotel in early June, a week after the film wrapped a six-month shoot in Scotland, Shanghai and several places in between. Craig, dressed casually in a grey pullover, blue shirt and jeans, is discussing Skyfall's depiction of the legendary spy. "Sam and I talked long and hard about the fact that we wanted to make a very classic Bond," says Craig. "Therefore something that looked back and was very present, all at the same time. Bond films have never been nostalgic. They've always been about the here and now. There are a lot of Bond fans and people make a lot of demands of Bond movies, and we've not always listened to that." He corrects himself. "Well, it's not that we haven't listened - it's that we've done what we've done."

It's still several weeks before Craig will announce that he'll sign on for two more Bond outings after Skyfall, yet you could almost read it in his body language. "I'm genuinely proud to be in this film - we've done the best job we can," he beams. "I've instilled a huge amount of myself in this and I think we've done a great job for the 50th anniversary."

This isn't Hollywood hype. Skyfall achieves the difficult balancing act that Craig talks about – looking both backwards and beyond. With a plot that integrates Bond's superior M (Judi Dench) into proceedings more than any other 007 movie has ever dared to do, it also introduces new characters (played by Ralph Fiennes and Albert Finney). This time, MI6 itself is under attack. First its personnel, after a hard-drive containing the names of undercover agents embedded in terrorist cells is stolen and gradually leaked online. Then its property, as the famous green-and-beige SIS Building is targeted.

The references to Bond's past – the Aston Martin DB5 he first drove in Goldfinger; a return to Macau, last seen in The Man With The Golden Gun; and a "reptilian stepping-stone" moment a la Live And Let Die – fitted into the storyline organically, says Craig. When Bond's new gadget-master Q (Ben Whishaw) just gives him a gun and a miniature radio transmitter, the youngster asks: "What were you expecting – an exploding pen? We don't go in for that any more."

If this is a sure sign that Bond has moved with the times, 007's Tom Ford-designed suit has a decidedly retro look, recalling Sean Connery's threads from those early Bond films. "That 1960s feel is definitely something I was keen to get back into the movie," says Craig.

The overall aesthetic, governed by Roger Deakins's cinematography and Dennis Gassner's design, is quite simple. Producer Barbara Broccoli describes it as "classic but contemporary". Broccoli has steered the franchise since her late father Albert "Cubby" Broccoli (who brought Bond to the screen alongside co-producer Harry Saltzman under the banner Eon Productions) retired from active duty in the wake of 1989's violent Licence To Kill.

Her father, she says, was full of advice. Such as? "Don't screw it up. He said, 'You've got to be brave, take risks, make the decisions.' That was the way he approached life. He would say, 'Whenever you're stuck, go back to Fleming.' And we always go back to the books. You think, 'Christ, this doesn't make any sense, what would Fleming do?'"

That's exactly what Broccoli and co-producer Michael G Wilson did after 2002's Die Another Day – Pierce Brosnan's last 007 outing – began to make the franchise look rather antiquated, with its invisible cars and diamond-faced villains. Installing Craig as the new Bond, they returned to Ian Fleming's first 007 novel, Casino Royale, after the rights – never owned by her father – finally came back into the Eon fold. Rebooting Bond was a risk worth taking. Bond in the Brosnan era had become, as M herself puts it, "a sexist, misogynist dinosaur – a relic of the Cold War".

Garnering $594 million at the box office, Casino Royale proved the most successful Bond film of all time. Craig's second outing, 2008's Quantum Of Solace, picked up immediately after the Casino Royale story ended and took almost as much money, but its plot involving Mathieu Amalric's eco-terrorist was an undeniable disappointment. Worse still, a year later, MGM, the studio behind the Bond films, went up for sale. Understandably, there were no takers for the veteran Hollywood outfit famous for its roaring lion logo, with buyers put off by the company's debts of $4 billion.

In 2010, with MGM undertaking plans to file for bankruptcy protection, work on Skyfall was put on hold indefinitely. Mendes stayed with the project, but screenwriter Peter Morgan walked. It wasn't the first time Bond had hit a bump. As Stevan Riley's recent documentary Everything Or Nothing: The Untold Story Of 007 shows, the franchise has almost come unstuck numerous times, due to spats between producers and legal squabbles over the rights to Fleming's work,.

"Everyone takes for granted how this train has stayed on the rails," says Riley. "But it's no mean feat with changing decades, generations, time, socio-political climates." The way he sees it, Bond's survival is quite simple. "It's a very accessible character, one that appeals to our most base instincts. Especially to men, but then equally attractive to women. But at the same time full of contradictions and complexities. All those things are present in the character originated by Fleming. He really did have this character operate at the extremes, and that's where we all like to go when we're watching a fantasy."

Craig claims he was never afraid the series wouldn't make it to a 23rd outing. "I just thought the financial situation would be sorted out," he says. It actually provided a silver lining, with regular Bond scribes Neal Purvis and Robert Wade brought in to work on the departed Morgan's early ideas. "We don't usually get a lot of preparation time," adds Craig. "It's usually 'kick bollock and scramble' up until we start shooting. But this gave us some breathing space. We had a very solid script."

Of course, you can't have a birthday Bond film without a memorable villain, and casting Javier Bardem as the blond-haired Raoul Silva was an inspired choice. The Spanish actor won an Oscar for his role as the villainous Anton Chigurh in the Coen brothers' No Country For Old Men, and Bardem's Silva is no less chilling. A psychopathic cyber-terrorist with vengeance on his mind, part Hannibal Lecter, part Liberace, Bardem's characterisation may be the campest since those fey henchmen Mr Wint and Mr Kidd menaced Sean Connery in Diamonds Are Forever. But one scene – in what surely is a nod to Richard Kiel's metal-mouthed giant Jaws – will go down as a classic Bond moment.

"Sam Mendes put it very well when he said, 'James Bond movies are in the middle ground of fiction and reality' – especially when you're playing a villain," Bardem tells me. "You have more freedom to create something that has to be ground to Earth but also you can fly a little bit higher than the rest, because you're playing this iconic character that in itself is a genre – a Bond villain. And in a movie like this, celebrating 50 years, there's something special about that character that has to be there – a homage to Bond villains."

While there are the usual pit-stops in exotic locations (beginning with a thrilling pre-credits chase in Istanbul), the story intriguingly takes Bond to Scotland. As any aficionado knows, in You Only Live Twice, Fleming's penultimate 007 novel, the author wrote that Bond's father came from Glencoe. Skyfall takes us back there – and to 007's roots – with a moody sequence shot in Glencoe and Glen Etive. "It was just a great part of the story to go and revisit it," says Craig. "To say this is where he's from and this is what he's about - it was good to go there."

Financial ups and downs aside, quite how Bond has survived over all these years is an intriguing question. Naomie Harris, who plays Eve, a field agent who joins Bond in the opening Turkey-set sequence, believes it's his "anti-bureaucratic stand" that appeals to us all. "Bureaucracy has gone a bit crazy in our society at the moment," she says. "You need permission to open a letter almost. And Bond is all about acting on instincts and gut feelings. I love that. That's the way forward. We need to get away from this intense bureaucracy and get back more into, 'Does this feel right?'"

Ever since Sean Connery first uttered those immortal words, "My name's Bond - James Bond", in 1962's inaugural 007 outing, Dr No, each of the six Bond actors has stamped his own mark on the character. Craig has taken the darkness glimpsed in Timothy Dalton's two Bond outings and amplified it. Casino Royale and Quantum Of Solace portrayed a rookie spy untamed, vengeful, even heartbroken, after the death of Eva Green's agent Vesper Lynd. In Skyfall, he is even more world-weary – all bloodshot eyes and cynical, hard edges.

Craig's incarnation of 007 is arguably the most psychologically detailed portrait yet of the MI6 spy, a world away from the laid-back smarm of the Roger Moore years. If there's a reason for Craig's success, it's that there's a vulnerability here that we've never seen before. "I think he's an incredibly dark, complex character, who fights his demons," says the actor. "He kills people for a living, for Christ's sake! That's his remit in life, and I think it affects him, but he doesn't let it. You can see cracks appear occasionally, and that makes him interesting."

In Skyfall, Bond is almost out of condition – a true first for the franchise – but that didn't allow Craig any chance to slack during the arduous shoot. "I have a very strict regime when I'm working," he says (indeed, Bardem reports seeing the actor emerging from the on-set gym at 7am). "There's an aesthetic choice there, because the boss [Broccoli] makes me take my shirt off every other scene. So I want to look as good as I can." And there are several shots in Skyfall with Bond minus his shirt – though nothing quite as revealing as Casino Royale's infamous "swimming trunks" scene.

While Craig's Bond seems to spend every waking hour drinking (controversially, Heineken beer tied up a promotional deal with Eon), the actor has to stay clean and sober during the shoot. "I pick my moments. When we get the chance to party, we do." So none of Bond's famous vodka martinis, shaken not stirred, on the set? "When was the last time you did three actual martinis during the day?" smiles Craig.

Product placement isn't the only recent addition to the franchise. Take the Bond girls. "They're much more modern," says Harris. "I don't think you can even call them Bond girls any more. They're just women who happen to be characters in a Bond movie, and they can be anything - they can be equal to Bond." While Eve might be, Skyfall's Severine may be a step back. Played by Berenice Marlohe, she's "the link to James Bond and Silva", according to the French actress, who seems to possess a rather tiresome licence to smoulder. It hardly matters. As one reviewer put it: "The real Bond girl is of a more seasoned vintage: Dame Judi herself."

As Skyfall's credits promise, "James Bond Will Return" – but can he sustain another 50 years? "I think so," says Riley. "Fleming said the Bond stories were fairy tales for adults, and he likened Bond to George and the Dragon - so it's something mythical and timeless. It's even receiving the equipment from the guru, from Q, and then going into the villain's lair. I think it's that primitive element that we respond to."

No other film franchise has come close to surviving for this long, something Craig attributes to the Bond clan behind the films. "Barbara, Michael and her family have kept this going for a long time. I think if it'd gone into the States, into the studio system, it would have disappeared for long periods. Somehow by keeping the movies as good and individual as they are, they've kept them going. I think if it had just been about the money, these movies would have died a death."

As Skyfall so elegantly shows, James Bond might be 50 but he is very much alive.

Skyfall (12A) opens on October 26.