In this fabulous historical throwback where the past is recreated daily by hired hands dressed in colonial costumes who move among the neatly reconstructed 18th century houses and gardens, it always has seemed that monetary concerns were hundreds of years away.

After all, everyone knows that CW, as it's called here, was John D. Rockefeller Jr.'s vision of the past. When he died in 1960, it generally was perceived that he generously had underwritten his dream in perpetuity.

But while Rockefeller left multimillions to help ensure that the quality of CW would not be compromised, he nevertheless failed to anticipate latter-day economic developments -- the energy crisis and the surge in inflation.

In 1979, when gasoline prices went through the roof, Colonial Williamsburg was rushed into the 20th century. Judging from the crowds here on a recent weekend, however, CW seems to have survived that crisis.

In a state where tourism is one of the most important businesses -- from Mt. Vernon in the Washington suburbs, to Tidewater in the southeast, to camping and hiking attractions in the Blue Ridge Mountains -- Williamsburg is one of the most vital components, and the number of visitors it attracts is a closely watched barometer.

Economist Leland E. Traywick, who specializes in monitoring both Virginia's economic and local Williamsburg activity for the College of William and Mary's business school, says he is not optimistic about the outlook this year for Williamsburg tourism.

His Williamsburg Business Index, which reflects retail, room and ticket sales, showed only a slight increase in January and February over a year earlier. In March, traditionally the opening month of the tourist season, Traywick charted a 17.5 percent decline in the Williamsburg index.

But Virginia as a whole has a better record for the year so far. According to Marshall Murdaugh, commissioner of the Virginia State Travel Service, visitations at nine attractions around the state are up 14 percent over the past two rather lackluster years.

In Williamsburg, as in some other Virginia tourism meccas, there has been one notable change that is traceable directly to the energy crisis. More and more visitors come here on tour buses, which fill acres of parking lots that once were the exclusive domain of private automobiles.

But there has been another, more troubling consequence of recent economic problems that has longer-term implications for CW, in particular, among Virginia's major attractions.

Inflation, stoked by rising oil prices, has eroded the value of the assets of the Colonial Williamsburg Foundation established by Rockefeller to maintain and expand this costly museum al fresco.

As a result, during the past few years there has been a steady increase in the deficit in the cost of operating Colonial Williamsburg.

"First of all, we're very healthy financially, very strong in assets and income," assures CW Foundation president 50-year-old Charles R. Longsworth, who adds: "But the problem we cope with as best we can in that income doesn't grow as fast as expenses in this economy unless you're very careful."

The Colonial Williamsburg Foundation owns hotels, restaurants and real estate that return about $60 million a year in gross income.In addition, there is the $100 million endowment fund made up almost entirely of Rockefeller money. Under an investment program, the endowment pays the foundation about 5 percent a year.

"With $60 million coming from operations in 1981 and about $5 million from the endowment, we are self-sufficient, but on a very marginal basis," says Roger F.H. LeClere, vice president and treasurer of the foundation. "It's not a very comfortable situation."

CW, which describes itself as a museum, remains open year-round. Crowds of 7,000 a day in July plunge to about 500 in January. Of CW's 3,000 employees, about half are hotel and restaurant employees and many of them are seasonal.

But even when the number of visitors dwindles to a trickle, CW must keep on its master craftsmen, who include silversmiths, cabinet and musical instrument makers and housewrights who cut down trees to build houses without using nails. These craftsmen are primarily teachers who instruct visitors on their unique, 18th century skills.

A few years ago, the foundation management decided something had to be done to staunch the flow of red ink in its operations budget. "This is a very simple idea," says Longsworth. "The museum operations, historic areas and research operations cost us about $18 million a year, and we take in about $12 million. So we've got to find $5 or $6 million to make up the difference."

In 1977, the foundation hired Cambridge Associates Inc. of Boston, which advises the country's major universities and some of its leading museums on how to cope with inflation. James Bailey, a managing director of the firm, says: "The last 10 years have been most difficult for these nonprofit institutions. These 10 percent inflation rates actually destroy these institutions."

Bailey says that his firm, which still has ties to Colonial Wiliamsburg, advised the foundation to look at real estate development as a way to finance its operating deficit.

Carlisle H. Humelsine, who is now chairman, acquired a great deal of land around the historic district while he was president of the foundation between 1958 and 1979. CW now owns about 3,000 acres.

In one four-block section of Williamsburg, Humelsine spotted the threat of unsightly development leeching on the CW fame. He convinced the town to convert the area to residential zoning if the foundation paid commercial taxes.

It is on this land, called Peacock Hill, that CW has plans to go into the real estate development business. It has commissioned I.M. Pei & Associates, the New York architectural firm, to come up with a design for a town house development on the land. If CW decides to go ahead, it will sell off the houses and use the income to help defray operational expenses and to carry forward planned historic preservation projects.

Other land being considered for careful development includes some of the 600 acres that the Rockefeller family in 1979 gave to the foundation. Officials are quick to say that the development would include only a small portion of the land, well away from the Rockefeller home. Called Bassett Hall, the house dates to 1750 and is now open to the public.

Until about four years ago, CW never solicited contributions -- and its well-heeled guests assumed, thanks to the Rockefeller largesse, that their money was not needed. But that has changed, and a fund-raising drive is being headed by Roger Thaler, who did the same thing for Duke University. Now, the foundation boasts that it had nearly 12,000 donors last year, who gave $774,000, up 49 percent from a year earlier.

Dewitt and Lila Bell Wallace, founders of Readers Digest, had visited Williamsburg for a week each year, but it wasn't until 1976 that he was approached for a contribution. The result: a $5.2 million contribution most of it for construction of the Wallace Decorative Arts Center that will house artifacts that don't fit into the 18th century.

Another income source being plumbed by the foundation is the commercial area of CW called Merchants Square. CW is the landlord for all the buildings on the square and is searching for tenants who will prosper and pay rent. "It's time the area grew and was refurbished," says Longsworth.

A vacant Methodist church and Sunday school there have been leveled to be replaced with shops. Fast-food and ceramic shops are opening, and a leather shop is being expanded. And a sleekly designed restaurant called The Trellis opened recently, serving cuisine comparable in quality and price to that served at the Williamsburg Inn.

Indeed, Longsworth believes that fine food may be an answer to CW's financial questions. "I'm convinced that when Williamsburg becomes known as a fine place to eat, we'll flourish," says Longsworth, a former businessman who founded Hampshire College in Amherst, Mass., and who was elected president of the foundation in 1979 after serving for two years as executive vice president.

Certainly these attempts at broadening CW's economic base cannot compare in drama to the big financial deal in 1969 when Humelsine sold 3,013 acres of foundation land just outside of Williamsburg to Anheuser-Busch Inc. of St. Louis for $4.8 million.

"Humelsine was accused of getting into bed with a beer baron," recalls economist Traywick of William and Mary.

On that land, Busch has built its biggest brewery outside of St. Louis, an almost fully occupied corporate park of offices and light industry and a residential and resort community on the James River.

But its most famous project here is Busch Gardens, also known as "The Old Country," a vast amusement park that draws huge crowds.

According to statistics gathered by Traywick, Busch Gardens, which operates on the weekends in the spring and fall and every day in the summer, greatly outdraws Colonial Williamsburg, which is open year-round.

In 1979, for example, the year of the great gasoline crunch, CW drew 979,740 visitors, while close to 2 million people visited Busch Gardens. Traywick predicts that by the mid-1980's, CW will be drawing about 1.3 million annually, while Busch Gardens will get about 2.8 million.

Judging from the long, slow-moving lines for rides and restaurants on a recent weekend, Busch Gardens apparently is thriving beyond its own expectations.

But Longsworth says the foundation doesn't regret the Busch deal. He does, however, "resist the idea" suggested by the Old Country advertising that "it is the fourth corner of an historic quadrangle which includes Jamestown, Yorktown and Colonial Williamsburg."