Urban guerrillas fired four rocket rounds last night into a major South African Army base in a heavily populated area near Pretoria in one of their most daring attacks so far on the white minority government's institutions.

In Salisbury, Zimbabwe, the African National Congress, a black nationalist organization fighting to overthrow the South African government, claimed responsibility for the attack.

The rockets reportedly injured one person slightly and did little damage, but the attack was seen as a sharp stepup in the guerrilla campaign against the government. It was the first time such a high-profile military establishment has been attacked and the first known use of the 122mm rockets by black nationalists in South Africa. In past attacks, the guerrillas have used mines or time bombs.

The rockets were launched about 11 p.m. against Voortrekkerhoogte, a military base about six miles from downtown Pretoria that includes offices, a hospital, residences for officers and training camps for draftees. One of the rockets injured a woman who worked as a maid at the base when it hit her sleeping quarters.

Pretoria is the administrative capital of South Africa.

The rockets were fired from an Indian suburb, Laudium. Police said three men armed with automatic rifles seriously wounded a 17-year-old youth who apparently came across the insurgents during their attack. Police later found a rocket launcher, which they identified as Soviet-made, and cartridges from Soviet-designed AK47 rifles at the site.

A motorist and two policemen chased the fleeing attackers but were deterred by shots from the armed men. Roadblocks were immediately thrown up around Pretoria and its two black satellite townships of Mamelodi and Attridgeville and around the black residential area of Soweto outside Johannesburg about 50 miles away. Police Minister Louis Le Grange said he expected an early arrest.

Le Grange announced today that two armed men were killed in a shootout with police on a farm about 12 miles north of the Indian Ocean port town of East London. One policeman was seriously injured in the skirmish.

Le Grange said the men were believed to be the remainder of a group of five responsible for recent bombings in Durban and an East London shopping center. On Aug. 7 the same group allegedly killed two black policemen in the black homeland of Transkei and later exchanged fire with South African police at a roadblock, Le Grange said. Two of the group were killed in that shootout and one man was captured.

In another development, Finance Minister Owen Horwood yesterday announced an almost 40 percent increase in South African military expenditures to $3 billion in the 1982 budget. The bulk of this is expected to be used for South Africa's bush war against the South West Africa People's Organization (SWAPO) in neighboring Namibia, which is under South African control. But the expanded military budget will also finance increased security measures at home to counter the African National Congress.

South Africa's determination to prevent neighboring countries from providing safe refuge for its enemies, demonstrated by its almost daily cross-border raids against SWAPO and in some instances against congress facilities in southern Angola and by its January raid on congress offices in Mozambique, suggests that that the conflict will spill across South Africa's borders to an even greater extent.

Over the past 14 months the congress insurgents have switched from a rural-based operation to a more urban-centered campaign, mounting increasingly frequent, daring and sophisticated attacks in various parts of the country. These have included bombings against South Africa's strategic synthetic oil-manufacturing facility of Sasol, three electric power stations, a military recruiting office, rural and city police stations and railway lines.

While most of the attacks appear aimed at strategic targets of military or economic importance and timed to avoid civilian deaths, recent explosions have occurred in car showrooms and busy shopping centers. In one instance, a bomb was defused in the offices of Fluor, the U.S.-based construction firm building an extension to Sasol.

A private antiterrorism institute run by an ex-South African policeman has calculated that in the two years ending June 30, 70 people died in 127 incidents of "political violence and sabotage." The list included stone throwings, attacks on police stations and the South African attack on congress offices in Mozambique.

Oliver Tambo, the exiled congress president, said his movement would increase its struggle against the government and would begin "attacking and killing officials of apartheid" as the result of recent South African actions against it.