Amid warnings about the danger of sending "wrong signals" concerning American resolve in Central America, a House subcommittee yesterday gave President Reagan a narrow victory in the first congressional test of the administration's policy on El Salvador.

By a vote of 8 to 7, the House Appropriations subcommittee on foreign operations approved the administration's request to "reprogram" $5 million in previously appropriated foreign aid funds and use the money for additional military assistance to El Salvador.

The vote was largely symbolic because the administration has already provided El Salvador with an extra $20 million in military aid that was not subject to a congressional vote. But the importance of the symbolism was not lost on administration officials, including Secretary of State Alexander M. Haig Jr., who lobbied hard to make sure the president did not lose the first test of his decision to increase military aid to El Salvador.

The key votes to approve the request were cast by Reps. Jamie L. Whitten (D-Miss.) and Silvio O. Conte (R-Mass.). Neither is a regular member of the subcommittee but, as the chairman and ranking Republican on the full Appropriations Committee, each is entitled to vote during subcommittee sessions. They did that yesterday at the strong urging of Haig and other administration officials.

Conte said he did not make up his mind on the issue until yesterday morning after a telephone call from Haig. The key factor, he said, was his fear that a vote against the Reagan policy this early in the administration would "send the wrong signal to Cuba and the Soviet Union" and could have "an adverse impact on our allies."

But Conte also warned that he will not vote for any more military aid to El Salvador until the murders there last December of four American Catholic missionary women are resolved and until the El Salvador government acts against widespread violence.

Whitten, who said he was also lobbied by Haig and others, said he, too feared that a vote against the additional aid might be "misunderstood around the world."

Democrats on the subcommittee, all of whom except Rep. Charles Wilson (Tex.) voted against the $5 million request, criticized the administration for viewing El Salvador primarily as a place to halt Soviet and Cuban expansionism while ignoring the country's deep, underlying political and economic problems. To define El Salvador in terms of "a confrontation between East and West . . . is nonsense," said Rep. Matthew F. McHugh (D-N.Y.).

The State Department tried to soften this criticism by choosing yesterday to announce it will send an additional $63.5 million in economic aid to El Salvador this year. This will raise its total economic assistance this year to $126.5 million, which is more than three times the total of $35.4 million in military aid this year, according to State Department spokesman William J. Dyess.

Dyess said the extra economic aid, which he called "an expression of faith in the government" of El Salvador, would not be conditioned on any specific actions by that government. He said the funds would be "reprogrammed" from other foreign aid accounts.

The $5 million in additional millitary aid approved yesterday by the House subcommittee was also reprogrammed from other accounts and did not represent a new appropriation.

The strongest critic of the boost in military aid was Rep. Clarance D. Long (D-Md.), the subcommittee chairman, who recently returned from a visit to El Salvador. Warning that the United States could be headed for another Vietnam experience, Long said, "The $5 million really doesn't make much difference from a military point of view, but rather represents an attempt to get the Congress to go along with the administration's efforts in El Salvador -- a kind of Gulf of Tonkin resolution to legitimize intervention."

Republicans on the subcommittee countered that the military stakes in El Salvador were larger than just that one Central American country. Soviet and Cuban gains in Africa are bad enough, said Rep. Jack F. Kemp (R-N.Y.), but it is "intolerable, in the face of those successes, to sit by and allow this to happen in the Western Hemisphere."