The nation's second largest oil company, Texaco, Inc., yesterday reported higher 1977 earnings but lower fourth-quarter results, and Gulf Oil Corp, said both its full-year and quarterly result were down due to a higher provision for federal income taxes.

Texaco's 1977 profits climbed to $930.78 million ($3.43 a share), up from $869.73 million ($3.20) the previous year. Revenues rose to $28.4 billion from $26.9 billion.

For the fourth quarter, the company's earnings declined to $202.4 million (75 cents) from $230.5 million (85 cents) for the same period a year earlier because of foreign currency losses.

In a related development, the Justice Department yesterday filed a stipulation in U.S. District Court in Los Angeles agreeing to dismiss its 1972 civil antitrust suit against Texaco and Douglas Oil Co. of California.

The suit had challenged Texaco's acquisition of 227 service stations owned or leased by Douglas on grounds that it eliminated competition between the two companies in the retail marketing of gasoline in the Pacific Coast area.

According to Hugh P. Morrison Jr., deputy assistant attorney general, the department agreed to the dismissal because changed market conditions and a voluntary divestiture program undertaken by Texaco eliminated probable anticompetitive effects.

Texaco has sold or has agreed to sell its interest in about 190 service stations in the market area involved, papers filed with the court disclosed, in addition to having ending its interest in about 200 others. Within a year of the acquisition, Douglas had regained the market share it held before and improved its financial situation substantially.

Gulf Oil reported a decline in full-year profits to $752 million ($3.86 a share) from $816 million ($4.19) a year earlier. Sales increased to $19.8 billion from $18.4 billion.

For the fourth quarter, Gulf's earnings eased to $175 million (90 cents) from $218 million ($1.12) on sales of $5.096 billion compared with $5.083 billion for the same period a year earlier. The company said a higher provision for federal income taxes contributed to the decline.

"The past year fell short of our expectations as a number of significant operating achievements were not matched by earnings gains," Jerry McAfee, Gulf's chairman and chief executive officer, said.