The General Assembly elected Bulgaria, Congo, Ghana, Venezuela and the United Arab Emirates today to two-year terms on the Security Council starting Jan. 1, and diplomats said the result would preserve the council's political balance.

The only contest in the voting pitted Ghana against Liberia, the official candidate of the 50-nation African group. But after winning 87 votes on the first secret ballot, 11 short of the required two-thirds majority, Liberia lost support. Ghana was elected on the fourth ballot, 109 to 46.

Western diplomats said the Soviet Union lobbied against Liberia, which broke relations with Moscow in the past year, as did the Arab group, because Liberia is one of a few African countries with ties to Israel. African diplomats said support for Liberia within the group was weak because of Monrovia's "soft" position toward South Africa.

The five nations elected today will replace the Ukraine, Egypt, India, Peru and Burkina Faso. The five other nonpermanent members, which will serve through 1986, are Denmark, Australia, Madagascar, Thailand and Trinidad and Tobago.

The five permanent members of the council, which hold veto power, are the United States, the Soviet Union, China, Britain and France.

The council is generally perceived as significantly more pro-West on East-West issues than the 159-nation United Nations membership as a whole. Had Liberia been elected, that tilt would have increased.