Virginia Gov. Charles S. Robb, in his farewell address to the state, tonight proposed spending millions of dollars more on education, prisons, mental hospitals and cleaning up the Chesapeake Bay, saying it all can be done within a balanced budget that offers "a message to America."

Robb told a joint session of the General Assembly that Saturday's inauguration of Gerald L. Baliles as his successor, along with L. Douglas Wilder, the state's first black lieutenant governor, and Mary Sue Terry, its first woman attorney general, will strike down "barriers three centuries old . . . by the power of a simple oath.

"At that moment we will cross a line from which there will be no return; Virginia will regain her rightful heritage and the responsibility for national leadership," Robb told the 140 lawmakers.

Robb, who has been mentioned as a possible 1988 presidential candidate, at times seemed to be speaking to an audience beyond Virginia. He called on President Reagan and Congress to follow the state's conservative fiscal example "by making the tough choices."

The popular Democrat did not recommend any tax increases, and failed to recommend how to finance highway improvements and mass transit, which is expected to be one of the most pressing issues of the 60-day legislative session that began today. While many lawmakers here are discussing bond issues or gasoline tax increases as ways of paying for the needed improvements, Robb's only mention of transportation was to praise Baliles "for the emphasis he's placing on this issue."

Robb's speech won praise from most legislators, with some calling it the governor's best speech. Sen. Charles L. Waddell (D-Loudoun), chairman of the Senate Transportation Committee, shared that view, but expressed concern that Robb "glossed over pretty rapidly" the roads issue.

"He didn't want to take anything away from Baliles . . . " said Sen. Edward E. Willey, chairman of the Senate Finance Committee, who suggested that Robb intentionally "wanted Baliles to build up that program" during his administration.

Republicans were among the most critical with a number saying the speech showed Robb's national ambitions. "We ought to send a copy of this to Sen. [Gary] Hart [D-Colo.] "Chuckled Del. C. Jefferson Stafford (R-Giles).

"It was a good wrapup, but a lot of window dressing . . . not many suggestions for the next four years," complained Del. A.R. (Pete) Giesen (R-August).

Deputy House Minority Leader Vincent F. Callahan (R-Fairfax) said he found it "a Reaganese speech -- take pride in America, take pride in Virginia." He also said Robb took too much credit for state's economic progress. "The state was a backwater state until he came and raised it from the sea," Callahan said sarcastically.

Continuing a theme that has dominated his four-year tenure, Robb said education remains "the bedrock of all that we do."

Robb said his recommendation to add $670 million above the current budget in the next two years would mean higher teacher salaries, smaller classes, better textbooks and equipment. If the legislature adopts Robb's budget, it would be the first time the state has fully funded the costs of meeting the state's minimum classroom standards.

Robb said that during his administration, teacher salaries moved from the bottom 10 to near the national median and student test scores went above the national average, helping make the state's schools "first in the South." With his new proposals, Robb maintained, however, that "the best is yet to come."

His upbeat speech tonight was in marked contrast to the sobering message of a year ago, when he told lawmakers that improving the troubled prison system should be their top priority. Tonight, he said, "I am now pleased to report to you that we've turned the corner."

"There is a new spirit across the Commonwealth," he said in a 30-minute talk that was filled with optimism. "You can feel it everywhere . . . . We've moved further and faster than any state in the nation."

Boasting about the state's progress, Robb said Virginia's "message to America" is that "budgets are balanced by making tough choices . . . . It's time the president and Congress started making them, too -- not in the 1990s. Two-hundred-billion-dollar federal deficits are a national disgrace."

Former marine Robb, a supporter of a strong national defense, added that "if defense spending has to be reduced, then reduce it. If entitlements have to be curbed, then curb them. If revenues have to be raised, then raise them.

"The bottom line is that America will never fulfill its destiny until it puts its financial house in order -- and the time to act is long overdue."

Robb's press secretary, George Stoddart, said the speech "was not designed to increase speculation" about Robb's future. "But he believes that the same fiscal discipline is needed" in Washington as in Richmond. "He feels very strongly that Virginia does have a message for America, first with the election -- we were the first to do what we did -- and secondly, in being able to make tough choices to say no, and to have a balanced budget, indeed, a surplus."

Robb plugged two of his pet projects for Northern Virginia, state financial support for the long underutilized Dulles International Airport and the adjoining Center for Innovative Technology.

He noted that last year "three major airlines established hubs at Dulles, and a fourth will be added this spring, making Dulles the fastest-growing airport in America."

The center, which is supposed to link university research programs with those in private industry, "has begun building the bridge between scientific research and Virginia industry, solving the mysteries of our most deadly diseases and inventing the next generation of industrial robots," the governor said.

Robb also proposed spending $40 million in the next two years on efforts to clean up the Chesapeake Bay, by preventing sludge, silt and toxins from entering the endangered estuary. He said $20 million in state money would provide seed money, along with federal funds, to help the cities and counties meet the $2 billion cost of improving sewage treatment plants whose waste water flows into the bay.

"But the most serious threats to our society are not all environmental," Robb said referring to the state's corrections system. He called for spending $36 million for renovation and prison construction on existing sites, adding cells to the system, and to close "the inefficient and outdated state penitentiary" in Richmond by 1990. He also called for increasing the size of the state police force and placing more troopers on the state's roads.

In mental health, Robb said his budget, to be presented to the assembly on Thursday, will call for ending a six-year halt in construction of mental hospitals, by proposing a $13 million, 200-bed facility in Marion in southwestern Virginia.

One of the few negative notes sounded by the outgoing governor concerned the state's infant mortality rate, which he said is the target of some programs in his budget. "Although we are making progress," he said, "the unfortunate fact remains that an infant born today, in some sections of our state, has a poorer chance of survival than one born in Singapore."

He said the budget also offers a pay raise for state employes, "to maintain our comparability with the private sector," but he was quick to note that the state government's overall work force was trimmed by more than 2,000 during his term.

Robb praised Baliles, who was elected state attorney general with Robb in 1981, as someone "who possesses the vision, the resolve and the creative energy . . . to bring the best out in Virginia."

The normally unemotional Robb grew eloquent in his closing remarks, saying, "to be a Virginian is to live a privilege as rare as any a free society can create, and to know that Virginians have paid for that freedom at Yorktown and Manassas, at Normandy and Iwo Jima, at Pork Chop Hill and Khe San.

" . . . and to be a Virginian is to know the broadest range of powerful images that are uniquely ours: the linear elegance of geese over the bay at first light; the fragile miracle of budding dogwood in March in the Shenandoah Valley . . . the Blue Ridge in autumn . . . . "