It was halfway through Baselworld, the glittering eight-day gathering where watch enthusiasts, dealers, artisans, and aficionados from the world over gather each spring in Switzerland — and the hot ticket of the night did not disappoint: The celebrated watchmaker Patek Philippe had summoned 650 of its retailers to a gala dinner held in the Volkshaus, a restored medieval manor near the Rhine in Basel. The esteemed Patek Philippe, maker of some of the finest watches in the world, was celebrating its 175th year, and in its honor, the facility had been decorated to resemble Geneva circa 1839. Waitstaff wore period costumes. A pair of actors dressed as the company’s founders performed a skit. By the time Thierry Stern, the 44-year-old president of the company, stood up to give remarks, he seemed almost awestruck by the spectacle. Stern, who succeeded his father, Philippe, in 2009 to become the fourth generation at the helm, paid homage to his family and Patek’s history and cracked a few jokes. Then he made an emphatic proclamation: “This is about passion,” adding, “I mean it really — it is a dream. Nobody needs a Patek.”

There aren’t too many company executives who could get away with standing in front of their customers and telling them that no one needs their product. But Patek Philippe is no ordinary company.

Even amid the rarefied business of luxury timepieces, Patek stands out. It is one of the last family-owned, independent Swiss watchmakers in a field of competitors, some owned by publicly traded conglomerates. (Rolex is privately owned by the Wilsdorf Foundation; Piaget is part of Richemont.) It is the leading haute horlogerie watch brand, with revenues estimated to be $1.2 billion and a 23.6% brand interest share (the next is Jaeger-LeCoultre, followed by Vacheron Constantin), according to World Watch Report. It makes some of the most expensive, most complicated, most valuable watches in the world. A new Patek can start at $25,000; most of its bestsellers are well into six figures. It has routinely shattered records for sales at auction, claiming the first wristwatches to top $1 million in the mid-1990s, and still holds the record for a watch sold at auction — the $11 million fetched by the Graves Supercomplication in 1999. Production is deliberately limited to 55,000 timepieces a year; by contrast, Rolex manufactures some 1.4 million.

Pateks are masterpieces of micromechanical engineering. Unlike many brands, which buy off-the-shelf components, Patek makes and hand-polishes all of the tiny parts — 15 million each year — needed to build the internal mechanism, known as a movement. Its artisans labor in enameling, jewel setting, and engraving; to produce a single dial takes four months and requires 150 different processes. All in all, it takes 1,200 steps to build a single Patek timepiece. Each one is hand-finished.

Even a shortlist of Patek owners provides a tour of the rich, powerful, and influential throughout history: Queen Victoria owned an enamel-and-diamond pendant model (the first with a keyless winding stem). Pope Pius IX owned several. In 1949, Joe DiMaggio celebrated the signing of his $100,000 contract with the Yankees (the first six-figure sum in Major League Baseball) with a Patek chronograph. Leo Tolstoy, Albert Einstein, Marie Curie, and Andy Warhol all owned Pateks. Eric Clapton is a collector; Jack Welch sported his gold Patek Calatrava on the cover of his book Winning. And while perhaps it’s not the kind of product placement anyone would ask for these days, a perpetual calendar model peeks out from under the cuff of Vladimir Putin (which could explain his perpetual hope of turning the geopolitical clock back to the Soviet era).

“I like that they are complicated but understated, and only the cognoscenti recognize them,” says a hedge fund investor who owns 20 — worth some $10 million — and says he decides which watch to wear based on the market: “I wear the same one until our fund loses money, and then I switch,” he says.

Pursuits Patek Philippe
Patek Philippe president Thierry Stern in the VIP room of the company’s New York offices — Photograph by Patrick James Miller for Fortune

Patek’s most coveted timepieces are known as Grand Complications. In the parlance of horologists, a complication is a feature outside of basic timekeeping (think of them as very old-fashioned apps). Each is a small universe that can contain sky charts, cathedral chimes, retrograde dates, moon phases (and yes, the time too). The queen of Grand Complications is the minute repeater, the highly complex mechanism that chimes the minute, quarter-hour, and hour. Like his father and grandfather before him, Thierry Stern personally listens to every watch featuring a minute repeater to test its acoustics before it leaves the factory.

Last year the company unveiled its most complex wristwatch to date, Reference 6002, more familiarly known as the Sky Moon Tourbillon. Incorporating 13 different complications (requiring 686 individual parts), it is encased in 18-karat white gold and sports a double dial with a cloisonné face. The price tag tops $1 million.

But money alone isn’t enough to get a Grand Complication — if you want one you’ll need to apply for the right to own one, and the Sterns personally approve each request. The hand selection is in part to safeguard against a rush to flip these rare instruments at auction. (Those buyers who put them up for sale risk being denied a purchase next time.)

At auction Pateks are ticking Picassos. John Reardon, the head of watches at Christie’s, calculates that more than 90% of the most expensive watches at auction in recent years have been Pateks. “They are miniature masterpieces,” he says.

Yet just as Patek hits 175 and as luxury timepieces have never been more popular — Swiss watch sales are at the highest level in the past two decades — the firm finds itself at a critical juncture.

Managing the demand for its timepieces is a bigger challenge than ever. Pressure is mounting on Patek to supply the flood of newly wealthy clients coming out of emerging economies like China. Another nuisance: Pateks regularly turn up on eBay, threatening its halo of exclusivity.

Then there’s the challenge Stern is particularly worried about: In today’s sped-up marketplace, finding young talent willing to sign up for a lengthy apprenticeship at the world’s most prestigious watchmaker is harder than it used to be. “It’s not easy to say to a young guy, ‘You need 15 years to apprentice before you can even start to be a little good,’ ” he says.

Technology also poses a threat in the form of the smartwatch, new computerized wristwatches that many see as the biggest rival to mechanical watches since the entry of cheap quartz watches in the 1970s. For the moment, Stern is not concerned. “When the iPhone came, everybody told me, ‘You are dead,’ ” he says. “But I’m still here.”

Founded in 1839 by watchmaker Antoine Norbert de Patek (Jean Adrien Philippe joined as partner in 1845), Patek Philippe’s modern era began in 1932, when brothers Charles and Jean Stern of Fabrique de Cadrans Stern Frères — formerly Patek’s dial makers — rescued the financially struggling company from its founders’ descendants during the Great Depression. The Stern family still owns 100% of the firm, and the company’s board consists of just three people: Stern; his father, Philippe, now honorary president; and longtime executive Claude Peny. (While Peny’s title is CEO, he primarily runs the financials; Thierry manages the company.)

This tight control is how Patek has been able to plough millions into research and development. In 1996, Patek replaced its Geneva workshops with a $140 million cutting-edge complex in Plan-les-Ouates, a small village south of Geneva. The company devotes unparalleled resources to servicing its pieces: While most luxury watch brands will not service watches made before the 1960s or ’70s, Patek will work on any dating back to 1839, a promise that requires maintaining an archive of 5 million components and a collection of tools that were used 175 years ago. (The only time the company could not restore one of its watches was when a client brought a Patek that was found mostly melted in the wreckage of the World Trade Center after 9/11. The company could only replace it.)

To hear Thierry Stern tell it, the future shape of his life came into focus at age 6 after he became fascinated by a drawer filled with antique enameled pocket watches during a visit to his father’s office. “It was then that I knew I wanted to design watches,” he says. “I kept saying this is what I wanted to do, and my dad kept saying, ‘No, wait, finish your school. We will see.’ ” Following family custom, Stern received his first Patek on his 18th birthday, a two-toned yellow-gold and stainless-steel Nautilus. “Before then,” he explains, “you may understand the name and the prestige of the name, but you do not understand the work inside.”

After studying business at the École de Commerce in Geneva and then training at the city’s legendary Watchmaker School, Stern joined Patek full-time in 1994. For eight years he worked his way up: sorted mail at the company’s U.S. headquarters, made bracelets and cases, spent time in retail and sales in Germany, and was the marketing manager for the Benelux countries before becoming head of product development in Geneva. In 2006, at age 36, he was named vice president.

Stern says he and his father concluded the time was right for his succession five years ago. “When I finally began giving orders, we saw that on important matters we were nearly always in agreement,” he says. The younger Stern has inherited a very different company. When Philippe took over from his father, Henri, Patek had just 150 employees; today there are more than 2,000. And yet both father and son assumed the reins during times of crisis. Philippe took over during the quartz crisis of the 1970s, when production shifted to the cheaper, electronic-powered watches and few thought mechanical watchmaking had any future. The younger Stern was handed the keys to the kingdom in August 2009, in the depths of the financial crisis. Thierry says business dropped 50% that year in hard-hit markets like North America. He spent six weeks flying around the U.S., visiting with more than 100 retailers, reassuring them that the company would support them. “I wasn’t going to drop them because they didn’t hit their targets,” he says. The business rebounded in 2010.

To get a sense of the Patek of the future requires a visit to Patek’s state-of-the-art workshops, housed in a sleek, glass-and-metal structure in Plan-les-Ouates, about a 20-minute drive from Geneva in an area once known for its quaint village and grazing cows. At the entrance stands an imposing 52-foot-high white limestone bas-relief of Patek’s most complex movement, the Calibre 89, a monster-size replica of its 33 complications and 1,728 parts.

In horological terms, innovation means making watches smaller, thinner, and more reliable, and just as technology has transformed the rest of our lives, so, too, it is having an impact on handmade mechanical watches, perhaps the world’s oldest mobile device.

Stepping inside the Patek factory feels like you’ve entered the CERN laboratories. More than 200 watchmakers dressed in anti-magnetic lab coats ply their trade; there are also 400 computer-operated machines that perform such specialized operations as cutting the infinitesimally tiny teeth on a ridiculously small wheel. Some of them require a full day just to program a single task.

In Patek’s research and development department — the inner sanctum of its factory — 80 engineers, technicians, and draftsmen develop new movements and functions merging some of the oldest techniques, like pencil designs, with some of the most cutting-edge ones (think design-assisted software and watch prototypes built using 3-D printers). It is an odd mix of old-school atelier and Space Age lab.

The company’s separate Nouvelle Technologie department is its experimental laboratory — this might be the world’s first 175-year-old “moon shot” division, in Google parlance — where it looks to find 21st-century solutions to improve 15th-century spring technology. In collaboration with universities and research institutes, Patek has been developing silicon-based materials that are lightweight and resistant to the eternal scourges of mechanical watches: magnetism and corrosion.

Stern is quick to point out that the purpose of such activity is not to simply build a tricked-out gadget. “It is possible to make something new and useful but not a gimmick,” he notes.

That’s certainly true, but the fourth-generation steward of the most legendary brand in watches also knows full well that the company needs to keep up with the times — and that the responsibility lies with him to do so. “Once you say, ‘Okay, everything is perfect,’ ” he says, “you are in trouble.”

Stacy Perman is the author of A Grand Complication: The Race to Build the World’s Most Legendary Watch.

This story is from the June 16, 2014 issue of Fortune.