HETCH HETCHY VALLEY — In a remote stretch of Tuolumne County, down a steep road choked with poison oak and manzanita, lies one of the most crucial pieces of Hetch Hetchy’s water infrastructure.

The Mountain Tunnel runs 19 miles and connects the Kirkwood Powerhouse to the Priest Reservoir, just north of the town of Moccasin. Millions of gallons of water funnel through the granite tunnel daily en route to faucets across the Bay Area. But the tunnel — built by miners nearly a century ago — is at risk of catastrophic collapse, which would affect the more than 2.6 million residents and businesses that depend on it for water.

The San Francisco Public Utilities Commission will shut down the tunnel for an unprecedented 90 days beginning early next year, completely cutting off the Bay Area from its main water supply in the craggy heights of Yosemite National Park. Crews will inspect the tunnel and make patch repairs. The improvements will be followed by seven to eight years of construction to stabilize the water system’s main artery.

“We don’t think we can wait much longer to do something about it,” said Steven Ritchie, assistant general manager of water enterprise at the PUC. “It’s a big deal because we get 85 percent of our water from the Hetch Hetchy system. Right now, if we have a significant collapse in the tunnel, it could take six or more months to bring it back into service. We need something more reliable.”

This fall, the agency is spending about $5 million to enlarge adits, or entry points, and improve accessibility to the tunnel, including widening gravel roads that skirt down steep canyons to it. The circular shafts that lead to the tunnel are only 3 feet wide — large enough to fit a single handyman with tools. After the project, they will be 8 feet — wide enough for vehicles to pass through. It will also cut the time needed to get the tunnel back online should part of it collapse.

“To be sure we can really take care of any significant failure, we want to be able to get equipment in there,” Ritchie said during a visit last week. “That will speed up what we are able to do. We’re still figuring out what to do in the big picture, whether that’s repairs or building a new pipe.”

City officials have known for more than 25 years that the hard-to-access tunnel needed significant work. Concrete laid before the tunnel opened in 1925 is deteriorating, and the volume of water flowing through the connector unobstructed is declining, data show.

About 12 of the tunnel’s 19 miles are lined with concrete and the other 7 miles were chiseled through granite. It’s the lined portion that concerns engineers. Reports dating to 1989 flag a stretch of tunnel in urgent need of repairs. A collapse in the Mountain Tunnel could cost more than $100 million to repair or $620 million to replace, according to the PUC.

Officials considered including the connector in the PUC’s $4.6 billion water system improvement project, which is near completion. But the tunnel was ultimately left out of the rebuild, which focused on stabilizing Bay Area water facilities at risk of failing during an earthquake. The upcountry tunnel didn’t pose enough of a seismic risk to be included.

“This has been many years in the making,” said PUC spokesman Charles Sheehan. “The first inspection was done in 1989. That’s when people started to realize there was work that needed to be done. Now it’s actually happening. We’re in the middle phase, and moving forward, we have to decide whether to do repairs over several seasons or just build something new.”

The agency is grappling with whether to repair the Mountain Tunnel completely, which would require shutting it down for two months every winter for up to 10 years, or to build a new tunnel parallel to the old one. The latter is the more expensive — but more reliable — option. Ritchie said the 90-day shutdown in January will help officials decide which option is best.

“We want to see if anything further has deteriorated,” he said. “Having year after year of work represents a risk we don’t want to take. With a new tunnel, you have the benefit of only having a shutdown at the end of the project. But it’s also much more expensive.”

The PUC has four to five months’ worth of water in Bay Area reservoirs at all times. Beginning in January, water will come from those stores, including Crystal Springs, San Andreas, Calaveras and San Antonio. Filtration plants on the Peninsula and in Sunol Valley also will help supply residents and businesses.

Meanwhile, crews will continue renovation work at two adits to the tunnel until the inspection begins. Last week, Bob Slater, a PUC watershed keeper, tested oxygen, carbon dioxide and explosive gas levels at one of the connector’s adits. PUC officials waited nearby to enter.

“So far we aren’t dead,” Slater said, joking.

The group walked down the tunnel through sticky mud and past gnarled chunks of granite. A bat careened out of a crevice, and the light gradually dimmed. At the end of the tunnel was a round bulkhead. Behind the cool, circular door, the weight of the Bay Area’s water supply quietly whooshed past.

Local wood lined the lip of the concrete door — an indication of work completed a century ago. Stalactites hung from the concrete, and orange mineral seepage discolored portions of the wall. Ritchie shined a flashlight at the bulkhead door. In January, after four days of draining, crews would open it for the first time in nearly 20 years and begin the inspection process and first repairs.

“What’s changed the most, that’s the most critical piece of information,” Ritchie said. “Getting in to see what’s going on is much better than worrying.”

Bob Mues, a project engineer overseeing the adit expansion, pointed out where the new door would start and end. The posse, wearing hardhats and thick-toed boots, watched.

“At some points we’ll be doing root canals,” Mues said, referring to the 90-day shutdown. “In other places, it’s just polishing. It’s amazing to think we’ll be in that tunnel where all of our water flows.”

The crew turned around and walked out of the adit, reflective vests glimmering, back into the light.

Lizzie Johnson is a San Francisco Chronicle staff writer. Email: ljohnson@sfchronicle.com Twitter: @LizzieJohnsonnn