WASHINGTON (AP) _ The Reagan administration, striking back at Zimbabwe for a Fourth of July attack on U.S. policy, has decided to reconsider a $20.5 million aid program for the African country which gained independence and black rule six years ago.

The State Department, noting there had been no apology from the Harare government, said Monday a formal protest had been presented to Zimbabwe for what spokesman Bernard Kalb called a ''breach of propriety.'' At the end of the day, the department's press office distributed a brief announcement that said ''hostile diplomatic behavior by Zimbabwean leaders has led to a further review of our aid efforts in that country.''

Since Zimbabwe gained independence the United States has provided more than $370 million in economic assistance. Congressial budget constraints prompted a reduction in this year's project aid from $26 million in 1985 to $20.5 million. So far only $7 million has been obligated for disbursement.

The United States has led all nations in providing foreign assistance to Zimbabwe.

Former President Jimmy Carter, who had supported the drive against the white minority government of former Prime Minister Ian Smith, led a walkout of Americans last Friday after a Zimbabwean Cabinet minister used the occasion of a holiday reception at the U.S. Embassy in Harare to criticize the United States.

David Kariamazira, the minister of youth, sport and culture, said the Reagan administration had ignored ''terrorism'' practiced by South Africa but bombed Libya in the name of fighting ''state terrorism. What we are hearing is nothing but platitudes and apologies for apartheid,'' he said in the speech, the latest in a series of flaps between Zimbabwe and the United States.

Carter, his wife Rosalynn, daughter Amy and acting U.S. Ambassador Gibson Lanpher, who had played a key role in negotiations leading to the country's independence, left in the middle of the speech, which was delivered by Kariamazira in behalf of Foreign Minister Witness Maugwende, a harsh critic of U.S. policy toward the white-ruled South African government.

Carter, who was making a brief tour of Africa, described the speech as ''a long, rambling, carefully prepared, vituperative attack on our country'' that he said was ''entirely inappropriate'' for a social occasion on the Fourth of July.

The former president also said he disagreed with many aspects of the Reagan administration's policy in southern Africa and that he favored stronger economic and political sanctions against Pretoria.

The Kariamazira attack followed recent accusations that the United States was helping fund clandestine South African radio broadcasts calling for the overthrow of Prime Minister Robert Mugabe of Zimbabwe and that the Central Intelligence Agency had aimed armed dissidents in the country.

At the reception, Kariamazira criticized the United States for applying economic sanctions against Nicaragua, Poland and Libya while refusing to take strong measures against South Africa.

Commenting Monday on NBC-TV's ''Today'' show, Carter said he was not objecting to the substance of Kariamazira's statement.

''It wasn't what he said,'' Carter said. ''It was the way and the time that he said it.

''All over that region, there's a general disappointment and sometimes outright condemnation of the lack of active opposition in our government to apartheid in South Africa,'' Carter said.

''I think that the expression that was there was pretty well representative of the attitude of the whole world, that we're not doing enough in Washington to help end apartheid in South Africa.''