The nation's output of goods and services rose a weak 2 percent in the second quarter and after-tax corporate profits dropped for the fifth consecutive quarter, further dimming hopes that the economy will pick up steam.

The rising U.S. trade deficit continued to erode economic growth and company profits, as manufacturers -- who often compete with makers of foreign goods -- accounted for the bulk of the earnings decline, the Commerce Department reported yesterday.

Although the estimate for growth in gross national product -- the nation's output of goods and services -- was revised up slightly from earlier estimates, analysts said that the reason for the revision provided more bad news than good for the economy's prospects.

Many economists, particularly those in the Reagan administration, had expected a sharp economic rebound in the second half of the year following the 1.1 percent growth rate in the first six months. The economy grew at a 0.3 percent rate in the first quarter. (Quarterly estimates of GNP are expressed as seasonally adjusted annual rates, and the percent changes are based on the results in the previous quarter.)

However, economists now are revising their estimates, saying that growth will not be nearly strong enough to prevent the federal budget deficits from rising further or to push down unemployment, which has held at 7.3 percent for the past six months.

White House spokesman Larry Speakes said, "The administration is still confident that the economy has resumed its pace of sustainable moderate growth."

Speakes also said that the continuation of economic growth depended on Congress. "Provided that the Congress will fashion its appropriations bills in line with its historic budget agreement, there should be no reason for the economy not to continue to expand in the last half of the year."

The White House also said that passage of its tax reform plan "would add even greater incentive, sending a strong signal to the nation's money markets and providing a framework for growth all the way into the next century."

The Reagan administration has said it expects growth of 5 percent in the second half and 3 percent for the year overall. Many private economists are forecasting growth of between 2.5 and 3 percent for the rest of the year and about 2 percent for all of 1985.

The second-quarter GNP figure was revised from 1.7 percent estimated last month. The revision was caused by businesses accumulating more inventories than expected, which adds to output. But inventories rose because sales were slower than expected. Economists now expect businesses to try to get rid of these inventories rather than rebuild them for future sales.

Expectations of a rebound in the second half of the year had centered on the hope that businesses would increase inventories in anticipation of stronger future demand.

The GNP report indicating slightly overbuilt inventories, combined with other recent statistics pointing to low demand for goods, is discouraging hopes for a rebound.

Additionally, the continuing erosion of profits will make it difficult for companies to continue their expansion plans, further reducing future output, economists said. As evidence of the slowdown in business spending, the Commerce Department revised down sharply its estimate for capital outlays in the second quarter.

In another development, Federal Reserve Chairman Paul A. Volcker, in a letter to Congress dated Aug. 6 but released yesterday, said that he expected a pickup in economic growth in the second half of the year, "but not to the same degree as occurred in 1983-84." Growth in 1983, coming on the heels of the deepest recession in postwar history, was 6.3 percent, measured from the fourth quarter of 1982 to the fourth quarter of 1983. In 1984, the economy grew 5.6 percent.

Volcker said that "somewhat faster" growth in the economy than has occurred in recent months would be "expected and welcomed" given the underutilized resources in the economy.

Economist Alan Greenspan said that the good news in the GNP report was that it was not revised downward, as many had expected.

"You almost got the impression that somebody pushed the pause button on the economy and everything in the second quarter seemingly marked time," Greenspan said. "The third quarter will probably be a period of very little GNP growth, something quite similar to the second quarter, but I would suspect we will see some modest improvement in after-tax profits."

Other economists were less sanguine about the outlook.

The increase in business inventories in the second quarter "is a bad sign for the second half of the year," said David Wyss of Data Resources Inc. The economy will continue sluggishly, which will not be "enough to get the unemployment rate down," he said.

The profit figure "hides the dichotomy of the economy," Wyss said. While services and defense industries are doing well, for industries that compete with imports or try to export "this looks like a recession."

Final sales adjusted for inflation rose a sharp 4.7 percent in the second quarter, suggesting that demand for goods is still strong. However, a lot of the increase in demand went to imports.

Corporate after-tax profits dropped 0.4 percent in the second quarter, with manufacturing accounting for most of the decline, Commerce said.

"The corporate profits news is really pretty dismal," said Edward Yardeni, chief economist for Prudential Bache Inc. "Corporate profits have been hurt by import competition, and I don't see that changing at all in the near term," Yardeni said.

Gross national product, seasonally adjusted at an annual rate, increased to $3.855 trillion in the second quarter. Inflation, measured by the GNP fixed weighted price index, which reflects only changes in prices and not the composition of output, rose 4.1 percent, compared with 4.3 percent in the first quarter.