The British government grimly acknowledged today that a "serious failure" in security at Buckingham Palace occurred early Friday morning when an intruder--who apparently had already been caught in the palace last month--found his way into the bedroom of Queen Elizabeth II.

Home Secretary William Whitelaw, who is responsible for police matters, confirmed press reports about the break-in in an address to Parliament and pledged that additional protection for the queen will be "pursued with the utmost urgency."

Immediately following the government announcement, Prime Minister Margaret Thatcher drove to the palace to meet with the queen and offer her apologies for the security lapse.

During Whitelaw's speech, the ancient hall resounded with expressions of outrage from politicians of all parties.

William Clark, deputy chairman of the ruling Conservative Party, said that if the intruder had been a "determined terrorist" the result would have been "catastrophic" and he expressed bewilderment that access to the queen's first-floor bedroom was even conceivable.

David Ennals, a member of Parliament from the Labor Party, said the public is "really very shocked and staggered" at what took place. But that dismay was compounded, he said, because the same person was alleged to have found a way into the palace June 7 and stolen a half bottle of wine. How could it be true, he demanded, "It really does seem incomprehensible."

Whitelaw replied, "I think I can say no one is likely to have been more shocked and staggered than I was."

The suspect was unofficially identified as Michael Fagan, 30, described as unemployed and of no fixed address. In accordance with British law, Whitelaw did not actually say that Fagan, who was charged Saturday with the earlier break-in and with stealing the wine, was the same person found in the palace Friday.

However, Home Office Undersecretary Lord Elton told the House of Lords that Fagan was the same man. Answering questions, Elton said, "The man about whom allegations are now being made is the man who was charged for the original offense," Reuter reported.

The queen was acclaimed in Parliament for her calm in the situation. Whitelaw refused to give details of the incident, but officials confirmed that the intruder spent 10 minutes sitting on the queen's bed, about six feet from her, at about 3 a.m. and was arrested when the queen summoned a footman to bring cigarettes, at the man's request. The Daily Express, which broke the story this morning, noted that the queen's husband, Prince Philip, was in a "separate bedroom at the time of the incident."

The New Standard, an evening paper, reported without attribution that the intruder scaled a perimeter wall and a drainpipe and pulled aside wire mesh to get at the window that led him to the queen's quarters, according to Reuter.

Today, the queen and Philip attended a ceremony at St. Paul's Cathedral to honor the 60th anniversary of the BBC. Reporters were kept at a distance to prevent questions. Prime Minister Margaret Thatcher canceled her attendance at the service to appear in Parliament at Whitelaw's side.

Whitelaw, repeatedly expressing the utmost chagrin, said a top police official had been named to "carry out an urgent inquiry into what went wrong and what lessons are to be drawn for the future."

He added, "Immediate steps were . . . taken . . . to strengthen security arrangements at the palace." These were evident today in added police patrols around the palace. An assortment of technical equipment throughout the grounds presumably was being checked and where possible upgraded. The 51 acres of palace grounds in central London are surrounded by 10-foot walls covered with spikes and barbed wire and topped with electronic sensors.

Security for the royal family is plainly a major problem. Much of their role is to make public visits and be seen at ceremonial occasions.

"The royal family are not very security minded," a spokesman for British security officials said tonight. "Their walkabouts are a nightmare, and security at the garden parties is not all that good. The technology is available but how much do they want it? Buckingham Palace is their home . . . . The queen could have a guard outside her bedroom door, but she would not like it."

Amidst a worldwide concern over attacks on such public figures as President Reagan and Pope John Paul II, there have been repeated instances in recent years of attempted bombings and assaults on British royalty, including an unsuccessful attempt at kidnaping Princess Anne.

Other recent incidents have ranged from the laughable--three West German tourists scaled the walls a year ago and pitched camp on the palace lawn thinking they were in a park--to the serious--a bomb went off a year ago when the queen was visiting the Shetland Islands. The queen was not injured in the attack, which was claimed by the Irish Republican Army.

All of this has led to elaborate new security measures largely under the supervision of Scotland Yard's Special Branch. Whitelaw said that "technical" as well as human errors were to blame for this incident.

According to Britain's Press Association, until several years ago all official visitors to the palace were given a password, which changed daily. Employes now carry special documents and all messengers must be accompanied by a footman. Nonetheless, the palace is so vast and its corridors so long and complicated that it is obviously possible for a person to elude detection by darting from one place to another.