Two government gauges of future economic activity rose sharply in June, suggesting that the long-awaited economic rebound is just around the corner.

The two measures were the strongest evidence to date that the economy may soon pull out of its slump following its stagnant 1 percent growth rate in the first half of the year, economists said.

The index of leading economic indicators, the government's main gauge of future economic activity, rose 1 percent in June following a 0.1 percent rise in May. This index, designed to predict economic activity three to six months ahead, had been weak for the past year, fairly accurately foreshadowing the sluggish growth so far this year.

A separate Commerce Department report released yesterday also pointed toward a return to moderate expansion in the economy. Orders for factory goods rose 1.9 percent in June, following a 2.1 percent increase in May, indicating that production of goods should pick up in the near future.

Many private economists said that although they expect a rebound for the rest of the year, it won't be terribly strong -- probably between 2 and 4 percent. The Reagan administration, however, predicted this week that growth would improve sharply in the second half of the year to a 5 percent rate.

Commerce Secretary Malcolm Baldrige said that while the leading indicators report "is consistent with projections of stepped-up economic growth during the second half, we need a stronger performance in the leading index to realize our growth targets."

At the White House, spokesman Larry Speakes said, "This ringing economic news on the future bodes well for renewed growth and continued expansion in the last half of 1985."

"We think the second half is going to look better than the first," said David Wyss, senior vice president of Data Resources Inc., an econometric forecasting firm. "But this is not a boom."

One major barrier to the rebound is the trade deficit, expected to climb to $150 billion this year. The deficit reflects the channelling of consumer and business purchases to foreign goods, which means less production and business for U.S. companies.

Economists said that the decline in the dollar in the past few months eventually should lead to a shift in the prices of foreign goods relative to domestic goods and make U.S. products cheaper and more attractive to foreign as well as U.S. consumers. However, they cautioned that the dollar would have to decline much more than it already has to make much of an improvement in orders for goods from American firms.

Economists attribute the possible upturn in the economy to lower interest rates during the past several months and the reduction by businesses of stocks on their shelves this spring in anticipation of slower consumer demand. This inventory reduction means that as future consumer demand rises, production will have to increase quickly to supply the additional goods consumers want.

The figures for new orders for manufactured products "were very good," although most of the increase reflected expenditures for defense and not other business and consumer goods, Wyss said. "That doesn't mean that you throw out the [defense] numbers, because defense goods have to be produced" and contribute to the economic expansion, he said.

Wyss said he expected moderate growth in the second half of less than 3.5 percent. "This does not look like boom time. It does look like the return to moderate expansion," he said.

Six of the 10 indicators available last month contributed to the increase in the index. They were net business formation, money supply, stock prices, average workweek, contracts and orders for plant and equipment, and change in sensitive materials prices. The index for sensitive materials prices was a positive indicator even though commodity prices declined in June because lower prices are considered good for the economy.

Vendor performance, which measures the backlog of deliveries of goods -- and suggests whether demand was weak or strong -- was unchanged in June.

The negative contributors were building permits, manufacturers' new orders for consumer goods and materials and average weekly initial claims for state unemployment insurance.

Economists said they were somewhat disturbed by the decline in new orders for consumer goods because it suggests that imports still will take away a lot of business from domestic firms in the near future. A large part of that decline was attributed to slower sales in the automobile industry, Wyss said.

In addition, sales of nondurables such as apparel, textiles and chemicals "in general have not been doing well. A lot of these have been coming from overseas," he said.

In the factory orders report, Commerce reported that new orders for defense capital goods contributed greatly to the rise in both months. Excluding defense, new orders rose 0.9 percent in June and 0.7 percent in May.

Durable goods orders rose 3.6 percent. Orders for transportation equipment rose 6.5 percent in June.

New orders for nondurable goods rose slightly as orders declined for foods, petroleum products and rubber and plastics. Orders rose for chemicals, apparel, paper and tobacco.