The nation's output goods and services -- the gross national product -- rose at an annual rate of 3.1 percent in the third quarter after adjustment for inflation, the Commerce Department reported yesterday in its second revision of the figures.

Originally the increase in real GNP was pegged at a 2.4 percent rate for the quarter, and it later was revised upward to 3.5 percent.

The estimates of inflation also were revised upward. The GNP deflator, first reported as rising at an 8.4 percent annual rate then changed to an 8.0 percent rate, went back up to 8.5 percent in the latest revision.

The revisions in the output numbers mostly were in business investment in equipment and in inventories, but none of the changes altered economists' general view that the third quarter was unexpectedly strong.

With the revisions so far, real output grew at a 1.1 percent rate in the first three months of 1979, fell at a 2.3 percent rate in the second quarter and rose in the third at a 3.1 percent rate. The indicators now available for the first two months of the fourth quarter show an economy gradually weakening but resisting the slide into the predicted recession, in the view of most forecasters.

Instead of a decline in real output in the fourth quarter, more and more forecasters now are looking for no change or perhaps a small increase. They generally still expect a decline beginning some time in the first or second quarter of 1980.

Estimates of corporate profits for the third quarter were revised downward, but only by $200 million. Before-tax profits were at an annual rate of $242.3 billion, up $14.4 billion from the second-quarter rate.

Profits from operations were up at an annual rate of $4.2 billion in the quarter. The remainder of the $14.4 billion increase came from profits recorded on the sale of inventories. In the second quarter, profits from both sources declined.

After-tax profits rose at an annual rate of $9 billion in the third quarter to $148.3 billion.