The nation's unemployment rate edged up slightly in December to 5.9 percent, marking the 11th consecutive month that joblessness has been stuck around the 6 percent level, the government reported yesterday.

But even though the jobless rate has not fallen much below 6 percent, the White House has shifted from fighting unemployment to fighting inflation, and has embarked on a deliberate policy to slow the economy -- a shift many analysts say may bring on a recession.

While the White House remains more optimistic, private economists are predicting that the jobless rate will climb to 7 percent by the end of 1979, and could go even higher before peaking in the middle of next year.

If so, that would leave the overall unemployment rate at about 7.5 percent of the work force -- a politically sensitive level -- as President Carter begins his campaign for the 1980 presidential election.

The December rise in joblessness, from a rate of 5.8 percent the previous month, came despite a speedup in the pace of the economy last autumn that spurred creation of a near-record 510,000 jobs in November.

Job growth slowed in December, with overall employment rising by 104,000 jobs. However, industry payroll levels swelled by a respectable 250,000 jobs after gains of more than 400,000 in each of the two previous months.

The December statistics capped a year of extraordinary, if not quite record, increases in the number of new jobs created in the economy. Overall employment grew by 3.3 million over the year.

Nevertheless, the unemployment rate fell only moderately in 1978, from 6.3 percent at the start of the year to 5.9 percent in December. By contrast, in 1977, joblessness plunged from 7.4 percent to 6.3 percent.

Labor Secretary Ray Marshall, who called a news conference yesterday to underscore the administration's success in creating new jobs, declined to concede that the unemployment rate would rise markedly in 1979 and 1980.

However, Marshall admitted that "it would be a relatively good accomplishment" for Carter to keep the jobless rate at December's level through 1979. He said the president must slow inflation before spurring jobs again.

The modest rise in joblessness came almost entirely among adult men and teen-agers. The unemployment rate for most other categories of workers remained essentially unchanged from November's levels.

The jobless rate for teen-agers rose to 16.5 percent in December, from 16.2 percent in each of the two previous months, while that for adult men climbed to 4.1 percent, from 3.9 percent before.

However, the unemployment rate for blacks edged down a bit, to 11.5 percent in December from 11.7 percent the previous month, while joblessness among whites rose to 5.2 percent, from 5 percent in November.

The number of people out of work rose by 135,000 in December to a new level of 6 million. By comparison, the number of jobless was 6.2 million at this time last year.

At the same time, however, the number of Americans with jobs remained at a record-high 95.9 million, the same as in November. Job-growth has been so sharp in recent months that virtually all groups have recorded some gains

The number of workers too discouraged to look for jobs anymore also has declined in the face of improving economic conditions. The department said yesterday that total dropped to 760,000 last quarter, a dip of 93,000.

December's increase in unemployment came amid a modest rise in the size of the labor force. The number of persons either employed or looking for work climbed by 135,000 in December, after rising 41,000 in November.

In a companion report, the department said its hourly earnings index -- which measures wages adjusted for overtime in manufacturing and other factors -- rose by 0.5 percent in December to a level 8.2 percent above a year ago.