Rustic Bath County, a remote enclave of thickly wooded mountains near Virginia's western border, has long needed an economic miracle. Historically impoverished, the little Appalachian county has seen its hopes of prosperity repeatedly dashed, while its unemployment rate climbed to 17.2 percent, nearly twice the national average.

But today, the long-sought monetary magic seems to be taking hold. As Bath's political leaders wait anxiously, millions of dollars in new tax revenues are pouring in. And hundreds of jobless men and women are streaming into this sparsely populated Allegheny Mountain region to apply for the largest single offering of new jobs throughout Virginia. "It's a blessing," says Edsel B. Ford, chairman of Bath's Board of Supervisors.

What has transformed penurious Bath County into an economic oasis during the depths of a national recession is a much-delayed deal between two major utilities--Virginia Electric & Power Co. and Allegheny Power System--to complete a huge $1.7 billion hydroelectric plant on a mountain stream called Back Creek, a Jackson River tributary, about 10 miles north of here and 160 miles southwest of Washington.

The giant power project, like the county chosen as its site, has been battered by economic troubles, veering into a financial tailspin during the spring of 1980 amid the nation's energy zigzags. Construction at the partly built plant came to a near-standstill; almost 2,500 workers were abruptly laid off, and the whole undertaking was being labeled a white elephant. Only Allegheny's offer to buy into the Vepco project saved it.

For Bath, the sprawling, twin-dam venture means a county budget fattened by $1 million or more a year in new real estate, sales and other taxes. "It's an economical shot in the arm for the county, really," says Bath Treasurer William T. Jenkins Jr. "I don't know how we'd survive without Vepco, based on our present trends."

Buoyed by this windfall, the county has already built a $1 million addition to its stately brick, white-columned courthouse. Ground was just broken for a $481,000 gym at one of Bath's two elementary schools and politicians are debating a new library for the other. A sorely needed water and sewer system is being discussed, along with hopes of luring clean, modern industry to the county, where tourism and agriculture remain the economic mainstays.

Since its start in 1977, the hydroelectric project has given at least temporary blue-collar jobs to thousands of Virginians and West Virginians, including hundreds of Bath County residents. Now with the Vepco-Allegheny deal nailed down, another 800 jobs are promised by summer, at wages ranging to $13.40 an hour--high pay for this area.

In marked contrast to bitter controversies over similar energy projects, the Bath venture has prompted only scant environmental protest, with critics complaining of damage to trout streams and terming the project unneeded. Few homes were displaced. Vepco officials contend they will improve Back Creek's flow and say they plan to build two lakes for fishing, boating and swimming.

So welcome is the project that Virginia Gov. Charles S. Robb issued a press release April 7 to announce the deal's approval--by regulatory officials in Pennsylvania. The Keystone State was, indeed, the last of five states to accept the Vepco-Allegheny financial package, and Robb noted he had urged Pennsylvania Gov. Richard L. Thornburgh to seek "an end to the regulatory delay." The Securities and Exchange Commission is expected to approve the agreement shortly, U.S. officials say.

Through it all, Bath County has suffered some of the growth pains that may strike any normally secluded spot caught up suddenly in a boomtown atmosphere. The winding two-lane mountain roads to the plant site have been strewn with auto wrecks, including several fatal crashes. Stores and banks lost thousands of dollars in 1980 when laid-off construction workers vanished with installment payments still due on newly bought trucks and television sets. The influx of temporary job-holders forced up rents, a hardship for Bath's young people and low-salaried employes, like school teachers.

"I'll tell you where the hurt came. A lot of people developed a life style they weren't accustomed to, and suddenly it was over," says Hugh Gwin, president of the Bath County National Bank, who figures his bank alone had to write off around $20,000 in uncollectable auto loans after the Vepco project layoffs. "We weathered the season of discontent."

Indeed, an increasingly cautious attitude is evident among county officials, who know the job bonanza will abruptly end again in 1986 when the power station is scheduled to be finished. Only about 75 of the plant's several thousand workers are expected to remain here to run it.

"What this does is lead to a life of uncertainty," says Erwin S. (Shad) Solomon, a prominent Bath lawyer and Democratic politician, recently defeated in a bid for Virginia attorney general. "This was a have-not county prior to the time this tax revenue from the Vepco project came in. Now's the chance to get the best. Whether they'll go for that I don't know."

While Bath struggled against economic odds, outsiders have viewed the county chiefly as a tourist mecca, a year-'round vacationland for golf or skiing, with a few charming inns and a widely famed country spa at Hot Springs, site of the elaborate Homestead hotel complex, the county's largest employer aside from the Vepco project.

Bath has no major industry. Its farmers raise sheep and cattle or produce pulpwood and timber. Bath's population is just 5,860, with perhaps a fourth of its families falling beneath the official poverty level. The entire county budget amounts to $2.8 million.

In addition, at the time of the massive Vepco layoffs, Bath and the surrounding region were hit by another employment disaster. A June 1980 fire heavily damaged a major fiber plant in the nearby city of Covington, causing 700 job layoffs. Hercules Inc., the big chemical company that owns the plant, decided not to rebuild it. Today the Hercules Covington plant employs just 590 workers, a steep drop from 1,400 before the fire.

Bath's economy remains buffeted, too, by seasonal job fluctuations. The elegant Homestead employs about 1,100 housekeeping, food service and other workers from April to November, but the total drops to 600 as tourism falls off in winter. Long-time residents say the yearly off-season downturns once were more severe--before skiing came to the region.

The meaning of Bath's latest fling with prospective prosperity is evident each workday morning at a drab parking lot near the hydroelectric project's main entrance, where jobless men and women gather to seek work as laborers, rodbusters, iron workers, welders, carpenters, pipefitters and electricians. "We had 500 to 600 people at the gate this morning for applications," said Vepco's project spokesman, Robin Sullenberger, on the first Monday after the hiring plans were announced. Hundreds more have shown up since then.

Frank Hartman, 49, laid off from a welding job in February, arrived before 8 a.m. a few days ago from his home near Roanoke, about 90 miles away. With him were his wife, Marna, who lost her meat packing job in September, and a son, Robert, 21, also applying for work. "I heard about it on TV and thought I'd drive up and give it a shot," said the senior Hartman. "I can tell you there's no work. I went to South Carolina looking for a job," added his wife.

Bob Shope, 41, drove in from West Virginia. He had not worked since Christmas, he said. "There ain't no damn building going on because of the damn interest rates."

"Can't find nothing. Been thinking about going into the Army," said job seeker, Tim Morrison, 20.

The two companies doing major work on the hydroelectric project, the large Daniel Construction Company and Clemetric Constructors, a joint venture, are expected to hire 30 to 50 workers a week until total employment reaches 2,050--still far below the 3,300 employes at the project's job peak in 1979 but nearly triple the 700 who remained after the 1980 layoffs.

Word of the hiring spread fast through Virginia and West Virginia, both faced with severe unemployment. Virginia's jobless rate reached a post-World War II peak of 8.4 percent in February, although officials hope the Reagan administration's defense buildup may soon bring new shipbuilding work to the Tidewater area. West Virginia's unemployment rate was 9.8 percent, still short of its worst postwar heights, but Mountain State officials say the February figure masks a much more severe decrease in manufacturing jobs.

The Vepco project's ups and downs mirrored America's changing energy outlook. Conceived in an era of rapid growth, the venture faltered as inflation soared and energy demand slumped. Critics now contend their early warnings proved accurate. Eventually Allegheny Power came to Vepco's rescue, putting up a $285 million investment along with an offer to buy up to 50 percent of the plant or its electric output later. The accord, held up by regulatory proceedings for one and a half years, is to be formally signed as soon as the SEC acts.

The plant, a pumped-storage system, consists of two big reservoirs, one atop Lantz Mountain and the other about 1,200 feet below. It is designed to bolster output at times of heavy demand for electricity, such as hot summer days. Huge tunnels are being installed to connect the upper and lower reservoirs. When the plant is in operation, water will plunge through the tunnels, spinning turbine blades to generate electricity. At times of slack demand, excess energy from other plants will be used to pump water back to the upper reservoir for storage.

Whatever the project's merits, Bath's vantage point remains unique. Sheriff James W. Bryan Jr. predicts more auto wrecks. "Any time you put 2,000 or 3,000 more people someplace, you're going to have some problems." Jack Strasser, whose store lost perhaps $10,000 worth of televisions and appliances when laid-off workers skipped town without paying up, now looks forward to recouping. "We've learned our lesson," he says. "We got our eyes opened in a hurry."

School Superintendent Percy C. Nowlin III hopes for salary increases for his underpaid teachers. "We've been poor for a long time," he notes.

At his Warm Springs general store, Charles Lindsay, the county board's vice chairman, ponders Bath's future, still a bit leery of banking too heavily on the county's predicted wealth. "It's been on again, off again. We didn't know if it would be a reality." But Lindsay is no naysayer. "It's been," he quietly observes, "the best thing that's ever happened to Bath County." CAPTION: Picture, A deal between the Virginia Electric and Power Co. and Allegheny Power System will complete the huge $1.7 billion hydroelectric plant. AP