Treasury Secretary James A. Baker III, defending the Reagan administration's trade policies before an audience of increasingly impatient governors, warned today against "quick-fix, meat-ax protectionist solutions" to the nation's trade deficit and dismissed a proposed 25 percent import charge as an "illusion written on the sand."

Baker also told the National Governors' Association conference that repeal of the current income-tax deduction for state and local taxes is vital to the administration's proposed tax revision, but he appeared to leave open the possibility of compromise.

"We didn't send it up there with the idea of negotiating or compromising it item by item before we get into the legislative process nor, for that matter, during the course of the legislative process," Baker said of the plan.

But "we recognize that there are likely to be changes made in various provisions of the bill," he said, adding that it is too early to say whether the state-and-local deduction will be among them.

Baker's appeal came as Democratic governors sharpened their denunciation of a recent fund-raising letter, sent out over the president's signature, that attacked them for raising taxes and blamed them for the stalemated efforts to reduce the federal budget deficit.

"To suggest that the Democratic governors are somehow responsible for the inability of the president . . . or the Congress to balance the budget or to bring the deficit in line does not seem to me to contribute to the goals that I think all of us share," Virginia Gov. Charles S. Robb (D) told Baker.

Speaking on behalf of the Democrats, Robb said that if Reagan would "provide the strong, courageous, principled leadership" and "make the tough decisions" required for a deficit-reduction package, "many of us stand ready to close ranks behind you and help you take the heat."

Baker said he would relay those concerns to Reagan.

The trade issue is the dominant theme of the three-day meeting here, as governors from both parties express concern about a deficit that means fewer exports from their states and a loss of jobs.

Baker said the nation's record trade deficit, $123.3 billion last year and projected to be as much as $150 billion this year, stemmed from "basic market forces" of an increased U.S. demand for imports, "little demand for our exports" and a strong dollar.

"There is little the government can do to directly influence -- i.e., distort -- the value of the dollar," he said, and he criticized "protectionism" as an effort "to violate the law or market forces."

"Its fond illusions are like fancy script written on sand," Baker said. "This year, the illusion written on the sand is a proposed 25 percent import surcharge."

Baker said congressional supporters of the proposed legislation have said the measure is not protectionist.

"You've heard of 'nonbank banks.' Now we have 'nonprotectionist protectionism,' " Baker said, adding, "Double-digit protectionism -- the 25 percent surcharge -- could cause a return to double-digit inflation."

Baker said the administration will "continue to pursue a fair, free-market, growth-oriented policy" on trade and is "satisfied, though hardly complacent, about the recent performance of the dollar."

"Trade negotiations are the proper forum for fighting protectionism," Baker said. "They are a far better approach than individual countries taking uncoordinated action by themselves."

Baker's remarks on tax revision appeared to signal a possible softening of the administration's insistence that there be no compromise on the issue of repealing the state-and-local deduction. It is the single biggest revenue enhancer in the tax revision plan, estimated to raise $37 billion in 1988.

The Reagan fund-raising letter, sent out on behalf of the Republican Governors' Association, said, "Liberal Democratic governors have teamed up with other liberal Democratic leaders to block our plans aimed at balancing the federal budget.

"For years, the federal government has been going deeper into debt by taking money from the U.S. Treasury and passing it on to state governments. But Democratic governors want to keep money coming . . . and they don't seem to care that our federal debt has grown to a frightening scale."