Sen. Edward M. Kennedy (D-Mass.), one of the chief symbols of Democratic Party politics in this country, played a key role today in the unexpected election of Richard Allen as Maryland's new Republican national committeeman.

Less than a week ago, Stewart Gold, a 41-year-old, wealthy businessman from here, appeared to have a lock on the job held by former Prince George's County Executive Lawrence J. Hogan until his resignation last month. But after a flurry of calls from the White House, which opposed Gold's candidacy, a series of inconclusive votes in a three-way race, and some angry hallway confrontations among Republican regulars, the state party's 15-member executive committee elected Allen, who did not even attend today's meeting.

"I had 14 committed votes, then they got scared," an angry Gold said after the vote. "There are some very good people in there, but they have no leadership. This party isn't going anywhere until we get some leadership."

Gold, an fund-raiser for the party during last year's elections, lobbied the committee hard and thought he had commitments for 14 votes. His candidacy was pressed from the beginning by younger party members who wanted a man not steeped in the state party's losing ways of recent years.

Then early this week came the news that cost Gold the election and left the state party's leadership divided and bitter. In 1980, according to an FEC report, Gold contributed $1,000 to Kennedy's presidential campaign.

"A buddy of mine came to me and said he was $6,000 short in his quota of fund-raising for Kennedy," explained Gold, a former Democrat. "He had helped me out in the past and I just really couldn't say no to him. I knew Kennedy was going to lose anyway."

Gold's explanation washed with some committee members, but apparently it did not play well in Washington. Several committee members said they were swamped with calls from the national committee and from the White House urging them not to vote for Gold.

When the executive committee members arrived for their 8:45 a.m. meeting, three candidates were considered: Gold, Richard Taylor, a longtime Reagan fund-raiser, and Allen, an Eastern Shore resident who was the national committeeman from 1968 to 1976 but has not been involved in party politics recently.

Allen's candidacy was the idea of Louise Gore, the party's longtime matriarch. Afraid of the rumblings a Gold election or a bitter Gold-Taylor fight would cause, Gore submitted Allen's name as a caretaker candidate until the full party meets in convention this May.

That caused dismay among many, notably the party's treasurer, Jeanette Wessel. "We have a $69,000 debt right now," Wessel said. "We can't afford to waste five months. We need someone who will start working 10 minutes after he's elected."

Gold was confident before the vote. "I've been encouraged by the way people have reacted," he said. "They know the kind of work I've done and I can do." Eight votes, a majority, was needed to elect, and on the first ballot Gold got seven, Allen got five, and Taylor got two. One committee member abstained throughout the balloting.

After the ballot, Dallas Merrell, the former Senate candidate from Montgomery County who campaigned for Gold, asked Taylor, who was Merrell's finance commmittee chairman last year, to withdraw and give his support to Gold.

"No, no way," Taylor answered emphatically.

The next vote was 7 to 7, with Taylor's two votes switching to Allen. In the hallway, Gold angrily confronted Party Chairman Allan C. Levey, whose support he had thought he had. Levey had remained mum throughout the deliberations and Gold asked him to announce his support for him. Levey refused, and a furious Gold stalked off.

Again, the ballots were collected: Allen got eight, Gold six, Taylor none. Levey began talking about the work the party now had ahead of it.

"Listen to that," said an exasperated Gold, throwing up his arms. "They just voted to do nothing and now the guy stands up there and says, 'Let's get to work.' "

He was not alone in his frustration. "We had a choice in this election," Merrell said. "We could move forward and try to become a competitive party in this state or we could remain a closed, old club. We're still an old club."

Both Gold and Taylor, who got into the race late, can still run for the job at the convention in May since Allen has agreed not to seek it then. Taylor said he would, Gold said he wasn't sure.

"We're outnumbered three-to-one in this state by the Democrats," said one committee member. "Now, we're facing more potential fratricide."