Thousands of protesters gathered on opposite sides of the Vietnam Veterans Memorial yesterday, most of them bitterly assailing the Reagan administration's growing military involvement in Central America, and a much smaller number defending it.

The two demonstrations marked the first political protests near the V-shaped memorial, and the fear of violence or defacement of the memorial drew a sizable police contingent--and dozens of uniformed Vietnam veterans, who came to guard the black granite walls on which are listed the names of the 57,939 men and women who died in Southeast Asia.

U.S. Park Police yesterday erected a four-foot-high red picket fence east of the memorial site to separate what Park Police estimated were 7,500 antiwar protesters from the memorial near 21st Street and Constitution Avenue NW. Police on foot, horseback, and motor scooters, and in cars and vans, stood guard behind the temporary fence. No serious incidents were reported.

Anti-Reagan protesters from around the country came in busloads to the demonstration organized by the "Ad Hoc Committee for July 2 Emergency Mobilization." Veterans groups strongly criticized the committee for using the Vietnam memorial site, but the demonstrators, including a substantial number of veterans, said the protest against U.S. involvement in El Salvador was a fitting tribute to the war dead on the July 4th weekend.

Several hundred yards away, near the Lincoln Memorial between 23rd Street and Henry Bacon Drive NW, a small but spirited pro-Reagan rally by the Captive Nations Vigil Committee heard a series of speakers, including former Black Panther leader Eldridge Cleaver, defend the administration's actions in El Salvador as a crucial weapon against communism. U.S. Park Police estimated that crowd at 500, but other observers said many more attended.

President Reagan, through an aide, delivered a message of support to those at the Captive Nations rally, which included South Vietnamese, Cubans, Nicaraguans and East Europeans who called on their experiences in losing to communist-backed forces to endorse the administration's present stance in Latin America.

The larger, antiwar demonstration began with a minute of silence in memory of the Vietnam War dead, and then opened with a passionate speech by Ron Kovic, a paralyzed Vietnam veteran and author. Seated in a wheelchair and nearly shouting his speech, Kovic said:

"We will never let them do what they did to us in Vietnam. Never, never again. If the dead could speak off that Vietnam Memorial wall over there, if their voices could be heard, they would tell you that you are right in what you are doing today.

"If those dead could speak, they would tell you that they would rather be alive than on that wall," said Kovic, whose speech was met by tumultuous applause and shouts from members of the crowd who waved banners and held signs on a knoll at Constitution Gardens, just east of the Vietnam Memorial.

The anti-Reagan organization, which later marched to and rallied at Lafayette Square facing the White House, claimed the support of some 500 liberal, leftist and labor groups around the country. Dozens of speakers denounced Reagan's Central American strategies as misguided, dangerous, and imperialistic.

The Captive Nations rally--organized several weeks ago by veterans, conservatives and right-wing groups in opposition to the Ad Hoc Committee--heard Reagan aide Faith Whittlesey deliver the president's endorsement, which said, "You gather in memory of the millions of people who have died as victims of communist oppression.

"Your gathering . . . helps serve as a reminder to the American people that it is our sacred responsibility to assist those needing our help to protect their basic freedoms and even their very lives," Reagan's message said.

Whittlesey said the administration believes that if the United States doesn't help the El Salvadoran government, then instead of "boat people . . . we will have 'feet people' and 'bus people' in large numbers" fleeing Central America to seek entry to the United States.

Loudspeakers from both the antiwar and pro-Reagan gatherings could be heard at the memorial site, where, Park Police said, about 9,000 family members and friends of Vietnam casualties visited yesterday.

"I have 17 buddies on that wall," said Richard Richman, a 37-year-old Philadelphia accountant, who stood at attention in his Green Beret camouflage uniform in front of the memorial. Richman, wearing his Purple Heart and other combat ribbons, said he and more than a dozen former Green Berets came yesterday to "guard this wall."

"I am not pro or con anything," he said, "We have a lot invested in the memorial . You see guys come here at 3 in the morning. Guys who never cried in their lives who come here and break down into tears. This place . . . it's important."

Cleaver, the former antiwar activist and black revolutionary who is now strongly anticommunist, drew the loudest applause at the Captive Nations rally when he condemned the Soviet Union and urged that the U.S. government do more to help El Salvador.

"I don't think Reagan is doing enough. I'd like to see more military activity and more pressure on the right-wing people to force them to make those land reforms and changes that can stop communism," Cleaver said in an interview.

"By just piddling around it's impossible to stop the communists," said 47-year-old Cleaver, who lives in Oakland, Calif.

After his speech Cleaver was surrounded by South Americans who congratulated him and praised his speech. But one black American came up to him and said: "You're less than nothing."

Many of the antiwar protesters assailed the Reagan administration's priorities. "Why are hospitals and day-care centers closed down, while the Pentagon budget is increased?" asked Tom Soto, a Vietnam veteran who said multinational corporations benefit from defense spending, "while our sons and daughters do the dying."

Both rallies drew people from around the nation. Jay Vasque, a New Bedford, Mass., social worker, said he rode all night on a bus to protest Reagan's policies, while 17-year-old Daniel Whitcraft of St. Louis said he was among a group from the American Society for the Defense of Tradition, Family and Property, who came because "We're supporting any movement against communism."