Three years after its opening, the Guggenheim still dazzles visitors and has cast its spell over Bilbao. But the secret behind its success is proving a little more elusive.
"They all ate here," says the waitress of the Zuretzat with immense pride. "The architects, the engineers, the builders – they came here every day." The yellow walls of the modest restaurant on Bilbao's scruffy Calle Iparraguirre are lined with hard hats, autographed and donated by workers who helped create one of the most famous buildings in the world.

Now the Zuretzat is full of tourists who have come to this damp town for a single reason. Stepping from the restaurant's gloom into a rare burst of Basque sunshine, it hits you in the face: at the end of the street, framed by rain-sodden apartment blocks, is the shining, toppling fish-massacre that is the Guggenheim.

It's hard to overstate the impact the Guggenheim has had. It shot Frank Gehry from well-known architect to most-famous-on-the-planet. It turned a scrap-heap town into a destination that is predicted to receive 3 million visitors in 2000. It showed how computers could unleash previously impossible geometries.

Nowadays, every provincial town with ambition is drawing up optimistic plans for a landmark building that will act as a catalyst for regeneration. They all want to "do a Bilbao" or replicate the "Guggenheim effect". But this success was all so unlikely.

Gehry conceded as much when he accepted the RIBA Royal Gold Medal last month – nominally for a lifetime's achievement, but effectively for that one building. "The miracle in Bilbao – I'm still not sure how it all happened," he said.

Three years on from its opening and the Guggenheim is showing few signs of ageing. OK, so the titanium shingles have become a little rain-streaked and the reflecting pools rather murky, but the building is still immaculate. It has been spared the political graffiti that disfigures almost every flat surface in the city and, for a product of a very Californian imagination, it has survived the miserable Basque climate remarkably well. Dazzling in the sunshine, it is equally mesmerising beneath a leaden sky, when it camouflages itself in steely greys.

Functionally, there are only a couple of minor faults. Watching Spanish mothers clattering their pushchairs down the daunting flight of steps to the entrance makes you wonder whether signage could be improved – there is an elevator but you have to go through the pavement cafe to find it. Likewise, the awkwardly raked stone staircase that links the city frontage to the river bank has the infirm-of-foot grumbling with frustration. Let's not forget that this is an art gallery and in this respect, too, the building excels. Within the exuberant exterior are a series of dignified and extremely flexible spaces. They contain serious art and make no concession to the current fad for gee-whiz interactivity and dumbed-down explanation. The public love it: a post-lunch band of Spanish pensioners whoop and cackle their way from Picasso to Braque to Klee, pausing to argue hilariously over a Miró ("Woman at night? What a load of rubbish!").

Even the building's staff is infected by its magic. The women on the ticket desk have broad grins while the primly uniformed gallery attendants giggle and joke with the visitors. For anyone familiar with the traditional Spanish approach to customer service, this is, in itself, a minor miracle.

This is a building that draws people in. Outside, the piazza in front of the entrance has become Bilbao's liveliest public space, peopled with an infectious rabble of coach parties, courting couples, skateboarders and picnickers.

But the Guggenheim is more than just a building – it's a piece of the city. Bordered by a filthy river, a horrific bridge, a wasteland and a railway line, it tames each of them, giving dignity to its unpromising surroundings. The riverbank has become a popular promenade, enlivened by an hourly plume of mist that drifts across Gehry's sweeping footbridge and engulfs unsuspecting pedestrians. The brutal Salve bridge is embraced by the building, which stretches beneath it and sprouts up the other side as a fantastically pointless stone-clad tower.

The building does appear to have regenerative powers. The adjacent wasteland is now valuable real estate and is due to become a new Cesar Pelli-planned business district. A new riverfront park, already in place in the old town a mile upstream, is rapidly creeping towards the museum. While reports that the building has single-handedly restarted the town's shattered economy are exaggerated, passenger numbers at Bilbao airport leaped by 13% when the museum opened and have continued to rise by 12% above the national average each year since. In its first two-and-a-half years, it generated £281m extra spending in the city and £49m additional tax revenue for the council.

Buildings this successful only come along once every decade or so, and the odds are stacked against other cities stumbling on the magic formula. But Bilbao was never counting on this single structure to turn its fortunes around. Rather, the Guggenheim is just the most conspicuous element in the city's long-term drive to equip itself with an infrastructure worthy of its ambitions. Bilbao wants to attract not only tourists but also high-tech companies and service industries. A concert hall, conference centre, metro and airport have already been built; trams, a major rail interchange and Pelli's business district are next. The Guggenheim's success is a sign that Bilbao is spending its money wisely.