By Anna Hirtenstein and Paul Vigna

U.S. stocks fell Tuesday, pulling back after a recent rally, as gloomy economic forecasts suggested a recovery will be uneven.

Major indexes opened lower, and the deadlines accelerated in the last 30 minutes of the session. The S&P 500 fell 34.40 points, or 1.1%, to 3145.32, snapping a five-session winning streak. The Dow Jones Industrial Average dropped 396.85 points, or 1.5%, to 25890.18. The Nasdaq Composite lost 89.76 points, or 0.9%, to 10343.89.

All three benchmarks have risen more than 40% from their March lows. But investors still have to weigh a recession and what are expected to be especially weak second-quarter earnings against their bets for a longer-term recovery.

"We're in this wait-and-see mode," said Oanda analyst Craig Erlam, adding traders are seizing on encouraging economic data in the U.S. and elsewhere, but continue to worry about the pandemic. "Every day, it seems always to be explained by optimism or anxiety," he added, referring to the market's moves.

Thursday's U.S. jobs report showed continued improvement in the labor market, though the jobless rate is still high at 11%. That's coming even as new cases of coronavirus in the U.S. are rising and some states are being forced to ease off their reopening plans.

Investors are also anticipating second-quarter earnings season, which will kick off later this month. Profits are expected to plunge 44%, according to FactSet, but investors will likely focus on the outlooks for this year and next. Expectations are already very low, which could play into the market's hands, Mr. Erlam said.

"As long as the bar is low enough, investors always find a reason to be optimistic," he said.

Shares of airlines were among the biggest decliners after United Airlines said reservations for travel within the coming month began to slide after new quarantine measures were put into effect. The carrier also warned employees to prepare to receive notifications of potential furloughs as soon as this week.

United fell $2.66, or 7.6%, to $32.55, while Delta Air Lines dropped $1.43, or 5%, to $27.01 and JetBlue declined 51 cents, or 4.6%, to $10.50. Airlines are also lining up another $25 billion in federal loans as they stockpile cash to weather a crisis that they have said will likely last years.

Elsewhere, Carnival fell $1.04, or 6.7%, to $14.57 after it canceled a series of cruises planned for the fourth quarter of 2020 and beginning of next year due to the coronavirus and resulting delays at shipyards.

Energy and financial stocks were among the biggest decliners in the S&P 500, with both groups falling more than 2%. The economically sensitive groups have suffered the steepest losses in the broad index this year.

Valero Energy fell $3.35, or 5.9%, to $53.12 and Devon Energy fell 81 cents, or 7.3%, to $10.35. Among financials, Goldman Sachs dropped $8, or 3.9%, to $199.36 and JPMorgan Chase fell $2.68, or 2.8%, to $92.32, weighing on the Dow.

With investors hesitant about the economy, bonds prices and the U.S. dollar rose. The yield on the 10-year Treasury note dropped to 0.648% from 0.683% on Monday, declining for the second day. The WSJ Dollar Index, which measures the greenback against a basket of currencies, rose 0.2%.

Gold futures climbed above $1,800 for the second time in two weeks, settling at $1804.20. That puts them less than 5% from their 2011 record high of $1,888.70.

The gains come as investors worry about the growing disconnect between rising stocks and an economy still deep in recession, said ThinkMarkets analyst Fawad Razaqzada.

"People are trying to hedge their long-equity bets by going long gold as well," he said.

Investors are keeping a close eye on Covid-19 infection rates. The number of cases in the U.S. rose by about 45,000 on Monday, according to data compiled by Johns Hopkins University, while the U.S. death toll has exceeded 130,000.

"We are in a situation where the latest news from the U.S., Germany, parts of the U.K. and the Melbourne lockdown in Australia, it just acts as a reminder to investors that not everything is going to proceed on a smooth trajectory," said Peter Dixon, an economist at Commerzbank.

Overseas stocks were mainly lower as well. The pan-continental Stoxx Europe 600 dropped 0.6% after reaching its highest level in nearly a month. Hong Kong's Hang Seng Index fell 1.4%, and Japan's Nikkei 225 slipped 0.4%.

The Organization for Economic Cooperation and Development said Tuesday that unemployment rates in the world's advanced economies will reach the highest level this year since the Great Depression.

And the European Commission released its Summer Forecast report, which downgraded its expectations for the trade bloc's economy. It is now expecting a contraction of 8.3% for 2020, down from its earlier prediction of 7.4%. It also forecast less growth next year than previously thought, indicating a longer downturn.

"Expectations about a V-shaped recovery have taken a hit," said Michael Hewson, a chief markets analyst at brokerage CMC Markets. "This means there's going to be a longer bottom. It's going to take awhile for economic activity to pick back up off the floor. It'll be very stop-start when it comes to trying to recover normal levels of activity."

Data released on German industrial production showed a rebound in activity in May after the country eased its lockdown, but came in below consensus expectations. Activity was still at least 20% below levels seen in February. Germany's DAX stock index traded down 0.9%, among the worst performing gauges in Europe.

It "shows how difficult the return to normality will be," said Carsten Brzeski, chief economist for the eurozone at ING. "After the lifting of the lockdown measures, businesses must have been more reluctant than consumers."

Write to Anna Hirtenstein at anna.hirtenstein@wsj.com and Paul Vigna at paul.vigna@wsj.com

Corrections & Amplifications

This article was corrected on July 8, 2020 because the original incorrectly said the U.S. jobs report was from Friday. The U.S. jobs report on Thursday showed continued improvement in the labor market.