President Reagan, saying that "I've had it up to my keister" with leaks to the press, yesterday directed White House officials to tighten control over contacts with reporters. Chief of staff James A. Baker III issued new "guidelines" requiring prior approval by the White House communications department of all interviews.

Communications director David R. Gergen said Reagan was particularly disturbed by leaks about White House deliberations over the shape of his fiscal 1984 budget and other recent articles in The Washington Post and The New York Times.

"The president does not appreciate having people who are what I call the free-lance artists who come out of a private meeting with him and expose the contents of a private meeting," Gergen said. "Before he and his advisers even have a chance to reflect on what's going on, they see it in the paper the next day."

Similar attempts to control media contacts and stop unauthorized leaks have been made by previous administrations in times of difficulty, only to be ignored or later rescinded.

The president has complained to his aides about "leaks" in the past when things have not gone his way. Having once described Washington as "one giant ear," Reagan has been concerned from the beginning of his administration about keeping his plans secret.

News reports based on leaks that portray the president as responding to orchestrated efforts at persuasion by his staff and congressional leaders also conflict with the public image his aides seek to project of the president making decisions on his own.

The new rules require Gergen or his office to clear all press interviews in advance or "designate" a White House official to handle queries on a given subject from reporters. "I would not call it a gag order," Gergen insisted. "We are going to try and serve you to insure that we get a full and free flow of information."

But he added that "I must tell you I think it's appalling when someone walks out of a private meeting with the president, like a budget meeting, and makes comments, some of which are misleading, to the press. . . . " Asked for examples, Gergen cited stories in The New York Times and The Washington Post about the budget deliberations. He also mentioned a report in The Post last week after the president's news conference, in which White House sources were quoted as saying the president viewed Soviet leader Yuri V. Andropov's latest summit overture as a public relations exercise.

"The president . . . has been irritated on more than one occasion," said Gergen about the leaks. "They do cause problems."

He then quoted Reagan as saying in a meeting yesterday, "I've had it up to my keister with these leaks."

Jack C. Landau, executive director of the Reporters Committee for Freedom of the Press, reacted yesterday with a statement:

"We think that the new press rules announced by the White House today indicate that the Reagan administration is flying off again on one of its news censorship binges. Today's gag order rules on White House officials are reminiscent of ill-fated efforts last year to impose a White House-controlled news blackout on all interviews with the 'national media' on foreign affairs and national security news . . . . The January, 1982, White House gag order was subsequently rescinded and we hope this latest gag order will meet the same fate.

"The president must understand that in a free society government officials in charge of policy have the right and the obligation to inform the public via the press. If Mr. Reagan wants all government information to follow the White House press release party line, he should hire the KGB. They are much better at enforcing censorship than Mr. Gergen."

Gergen, who has been described by other officials as one of those presidential aides most concerned about leaks, said the new guidelines have been under consideration for several weeks and were discussed with Reagan at a meeting yesterday. He said they were not related to comments Baker made to The Dallas Morning News about Labor Secretary Raymond J. Donovan.

In another previous attempt to control leaks, White House telephone logs were searched to locate the sources of quotations from unnamed White House officials published by The Wall Street Journal about Baker's handling of the 1982 congressional election campaign. Gergen acknowledged yesterday that logs had been checked "once before," but said there was no such "organized effort" to scrutinize them.

He said the new press guidelines were supported by a "strong consensus" of Reagan's senior aides. Gergen and White House spokesman Larry Speakes said they supported the new guidelines, although Gergen added that "in the initial months of this administration I questioned something like this."

"We understand that there are going to be occasional leaks," Gergen said. Asked whether there would be penalties for violations of the order, he added, "Could be . . . . The president takes this very seriously."

The new rules apply to the White House, the Council of Economic Advisers, the Office of Management and Budget, the National Security Council and the Office of the Science Adviser, Baker said.

Under the new rules, "Requests for interviews or comments from members of the staff who have not already been designated to answer questions should first be referred to the White House communications department." Only after "receiving a clearance or recommendation" from Gergen's office will the staff member be allowed to make arrangements for the interview, according to the rules.

For most of the two years of the administration, Gergen and all Reagan's other senior aides have asked reporters if they could talk on "background," meaning that their names would not be used.

But the new guidelines state, "On-the-record interviews should be recognized as the best way to conduct most interviews with the press."