General Motors Corp. said yesterday that it earned $333 million ($1.07 a share) in 1981 compared with a loss of $763 million in the previous year, but the gain was due to tax credits and earnings from its finance unit. Without the tax credit GM would have reported a $138 million loss for 1981.

GM also said its board of directors voted to continue the 60-cent dividend the firm has been paying since 1980. There had been speculation that GM would cut its dividend, and the board confirmed that this was considered. The corporation had reduced the dividend from $1.15 in the second quarter of 1980.

In the fourth quarter, the No. 1 automaker earned $97 million (31 cents), up from $62 million (21 cents) in the same period of 1980.

However, the fourth-quarter earnings include a $115 million tax credit. Without the tax credit and equity in earnings of its nonconsolidated subsidiaries, GM would have had a loss of $136 million.

Sales in the quarter were $15.64 billion, down from $16.20 billion the previous year, while sales for the full year amounted to $62.79 billion, up from $57.73 billion in 1980.

GM said its worldwide sales of cars and trucks to dealers were down 5 percent from the depressed 1980 levels.

GM's finance unit earned a record $348 million in 1981 compared with $221 million a year earlier.

Phillips Petroleum Co. reported yesterday that 1981 earnings fell 18 percent to $879.4 million ($5.78 a share) from $1.07 billion ($7.01) the previous year, although revenue increased to $16.29 billion from $13.71 billion.

Reduced income from overseas operations because of lower crude oil and natural gas production and "significantly higher" exploration expenses caused the lower earnings, said W.C. Douche, president and chief executive of Phillips, the nation's 10th-largest oil producer.

Fourth-quarter net income was $186.5 million ($1.23) on revenue of $4.39 billion, down 35 percent from 1980.

United Technologies Corp.'s sales and earnings increased in 1981 over the previous year, despite lower profits during the last quarter compared with the same 1980 period, the company reported yesterday.

UTC's involvement in a wide range of businesses enabled it to weather a "soft worldwide economic climate," said Harry J. Gray, chairman and president.

Last year's net income was $457.7 million ($7.71 a share) on sales of $13.668 billion compared with 1980 net income of $393.4 million ($7.28) and sales of $12.324 billion.

Fourth-quarter net income was $97.5 million ($1.51) compared with $102.5 million ($1.89) in the 1980 quarter, and sales totaled $3.51 billion compared with $3.54 billion.

Profits were off because of weakness in commercial airline orders for engines and spare parts, overcapacity and price reductions in the semiconductor industry and further softness in the already depressed automobile and construction industries, Gray said.

Allied Corp., one the nation's largest chemical companies, posted net income for 1981 of $348 million ($9.17 a share) on sales of $6.407 billion, a record 20 percent gain over 1980 net income of $289 million ($8.15) a year ago on sales of $5.519 billion, it was announced yesterday.

Allied Chairman Edward L. Hennessy Jr. said fourth-quarter net income was $59 million ($1.29) on sales of $1.696 billion, down 28 percent from 1980 fourth-quarter earnings of $82 million ($2.27) on sales of $1.448 billion. Hennessy blamed the decrease on a nonrecurring provision and foreign currency exchange loss that totaled $43 million after tax.

The company said its fiber and plastics divisions showed sharp decreases in income because of the nation's depressed auto and housing markets. However, operating income for the chemicals segment was slightly higher than in the third quarter.

Lockheed Corp. yesterday reported a net loss of $289 million for 1981, mostly due to the write-off of the wide-body TriStar commercial jet.

After-tax earnings were $155 million from continuing operations, the aerospace firm said.

Sales in 1981 totaled $5.2 billion compared with $4.4 billion in 1980.

Fourth-quarter earnings from continuing operations were $52 million compared with $48 million for the same period in 1980. Earnings from continuing operations in 1981 included pretax program profits from ongoing business--excepting TriStar--of $461 million minus interest expenses of $186 million. Sales rose to $1.53 billion from $1.24 billion.

The decision to phase out production of the TriStar resulted in an after-tax write-off of $396 million. There also was a $70 million after-tax loss associated with the 1981 L-1011 operations. In 1980, Lockheed lost $108 milion on the L-1011.