BARCELONA, Spain — Every year, more than a million people visit the home of Ana Viladomiu in Barcelona. She does her best to avoid them.
Ms. Viladomiu lives in La Pedrera, the last house built by Antoni Gaudí, the brilliant Catalan architect who died after being hit by a tram in 1926. His works around the city have helped make Barcelona one of Europe’s main tourism hubs.
On most days, long lines form outside La Pedrera, whose undulating and uneven stone facade makes it look as if cave dwellings had been carved into a massive rock. Once inside, visitors discover a building with unusual features from bottom to top. The tiled courtyard at the entrance resembles an underwater forest; the roof terrace has chimneys shaped like helmets.
For Ms. Viladomiu, however, living in La Pedrera raises some practical issues, starting with her daily struggle to reach the elevator that leads to her fourth-floor apartment.
“I’ve found myself many times elbowing my way home, while people shouted at me because they thought I was jumping the ticket queue,” she said recently in an interview in her apartment. “That’s not a great situation to be in, especially if you’re carrying your shopping bags back home.”
The apartment itself is a whitewashed and airy 350 square meters, or about 3,750 square feet, and is lightly furnished and has large bay windows. She has lived there since the 1980s.
Ms. Viladomiu, 63 and a writer, moved into the building shortly after meeting her husband, who rented one of the apartments before La Pedrera was declared a World Heritage Site by Unesco in 1984.
Gaudí designed the building as a private residence, which was then shared among several tenants.
In 1906, he was commissioned by a wealthy couple — Roser Segimon and her husband, Pere Milà — to build their new home on what was then becoming — and remains — the city’s fashionable shopping avenue, Passeig de Gracia.
Gaudí took six years to complete the building, after which the couple kept the main floor for themselves, but rented out the additional space, which had been subdivided into 20 apartments.
Gaudí’s building, officially called Casa Milà, became the talk of Barcelona even before it was completed. It was soon dubbed La Pedrera, or the stone quarry, because of its rough-looking facade and asymmetrical shape.
His design was satirized by newspaper cartoonists, and led to some legal feuding, including between Gaudí and the couple. The couple was eventually fined by the city authorities because Gaudí built a house that was larger than allowed by its building permit.
Ms. Segimon, who died in 1964, outlived her husband and sold La Pedrera to a real estate company. Another architect then transformed the top floor, which had been a laundry room, into more rental apartments.
Ms. Viladomiu has one of the few left. In March, she published a book, “The Last Neighbor,” about the history of the building, as well as the experience of occupying an apartment in one of the jewels of Gaudí’s Modernist style of architecture.
An added bonus, she said, is that her rent has not risen significantly in over three decades, even as the tourism value of La Pedrera has rocketed.
“Paying what I pay to live in such an extraordinary place in the heart of Barcelona, I would be very silly to move anywhere else,” she said, without revealing the exact cost of her rent.
Tourists pay 22 euros, or about $25, to visit La Pedrera, but that includes access to only part of the building, including one of the apartments he designed.
Still, intrepid visitors have sometimes overstepped the boundaries, forcing Ms. Viladomiu to add a barrier outside her apartment, to keep tourists at bay.
Before, she said, “there were people ringing my doorbell constantly, wanting to take a look inside my home.”
Occasionally, Ms. Viladomiu opened her front door to strangers. “When I have seen some tourists approach who looked interesting to me, I’ve shown them my apartment,” she said.
Ms. Viladomiu likens her experience to living on the set of “Big Brother,” the reality television show, photographed by tourists whenever she steps out onto her balcony and monitored by security cameras and smoke detectors she has sometimes inadvertently set off while cooking her dinner. “But it’s of course the ‘Big Brother of our World Heritage,’” she added.
Nowadays, Gaudí is at the heart of Barcelona’s tourism offering, and efforts are continuing to highlight his works. The most ambitious project concerns his unfinished masterpiece, the Sagrada Familia basilica, which was only about a quarter built at the time Gaudí died.
This month, the city authorities finally delivered a permit to allow the works to proceed, in a bid to complete the building in 2026, which would coincide with the centenary of Gaudí’s death. Two years ago, the first house that Gaudí built in Barcelona, Casa Vicens, was transformed into a museum.
Barcelona’s current love affair with Gaudí contrasts with the relative disinterest shown toward his works in the 1980s, when La Pedrera was last put up for sale and struggled to attract a buyer.
Eventually, Caixa de Catalunya, a bank, paid 900 million pesetas, equivalent to $6.2 million, to buy the building in 1986. The bank’s foundation then renovated La Pedrera and opened it to tourists, while offering to pay off the tenants to move out.
In addition to Ms. Viladomiu, a few other tenants also refused the foundation’s offer. Two of them still reside in the building, but they would not be interviewed.
Gaudí included features in La Pedrera that were novelties at the time, like an elevator and running water in each apartment. La Pedrera was also one of the first houses in Barcelona to have an underground garage, with 16 spaces where residents could park either their motor vehicle or their horse carriage. The garage has now become an auditorium.
But Ms. Viladomiu also pointed out some aspects of Gaudí’s design that showed how he prioritized aesthetics, including his extensive use of curved surfaces.
“You can almost forget installing a bookshelf, because there isn’t a single straight wall here,” she said. “Gaudí had very clear ideas and a very strong personality, which you just have to respect in order to live here.”