WASHINGTON—The U.S. trade deficit widened to a record in June as the resurgent American economy drove strong demand for foreign-made goods.

The foreign trade gap in goods and services expanded 6.7% from May to a seasonally adjusted $75.7 billion, the Commerce Department said Thursday. Imports climbed 2.1% to $283.4 billion, also a monthly record. Exports increased 0.6% to $207.7 billion.

Economists surveyed by The Wall Street Journal expected a deficit of $74.2 billion in June.

The trade report is another example of how American consumers and businesses have stepped up spending and investment as the economy has recovered to its pre-Covid-19 size, fueling demand for imports. Exports have grown more slowly, reflecting weaker recoveries in some other regions that have made less progress against the coronavirus.

The diverging outcomes between countries that are far along in their vaccination campaigns, and those that aren’t, have emerged as a fault line in the global economy. The International Monetary Fund last week raised its growth forecasts for the U.S. and other advanced economies with relatively high vaccination rates against Covid-19, while lowering the outlook for emerging-market countries where vaccination rates have lagged behind, especially in Asia.

That dynamic helps widen the U.S. trade deficit, as the American economy continues to pull in more goods from abroad. Several rounds of government stimulus payments have also left Americans with plenty of cash to spend, while weakened trade partners limit purchases of U.S. goods and services.

The increase in imports in June was driven by purchases of industrial supplies, iron and steel mill products, organic chemicals, and nonmonetary gold, which includes gold for industrial use, Thursday’s Commerce Department report showed.

Separate reports have shown that manufacturers had a strong month in June, with the Federal Reserve’s industrial production index reaching its highest level since the pandemic struck in 2020.

Imports of consumer goods declined slightly for the month, driven primarily by a drop in pharmaceutical imports.

The trade report for June covered a period before the Delta variant began its spread in the U.S. By the end of June, Covid cases were still very low, but the virus’ re-emergence has cast a shadow over the broader economic outlook.

“Deteriorating health conditions could distort trade further if virus restrictions are reimposed and recoveries stall,” said Mahir Rasheed, a U.S. economist with Oxford Economics.

A separate report Thursday from the Labor Department showed that U.S. jobless claims fell slightly to 385,000 last week, as worker filings for new unemployment benefits settled this summer at a level that is nearly double the pre-pandemic average.

Another challenge for the trade recovery: Although U.S. demand has been strong, global manufacturers have faced widespread problems fulfilling orders across their supply chains. The pandemic, factory closures and abrupt changes in shopping patterns have led to lingering shortages of crucial items, leading to manufacturing delays.

A severe shortage of semiconductors, for example, has slowed production of everything from computers to home appliances to automobiles. Many companies have found themselves squeezed between the surging consumer demand on one side and their supply-chain shortages on the other.

Subaru Corp. Chief Financial Officer Katsuyuki Mizuma said U.S. dealers are desperately trying to order more imported vehicles to relieve a shortage of inventory. Nearly all major auto makers like Subaru have had their production slowed by the global chip shortage.

“As soon as the ship reaches the shore, they sell right away,” he said.

If those supply chains prove difficult to fix, it could threaten the trade outlook in coming months, said Mr. Rasheed.

As the U.S. economy continues reopening, consumers could also turn away from buying so many imported goods—such as the computer gear they used for remote work—and once again spend more freely on restaurant meals, travel and other services. That would also narrow the trade deficit, economists said.

Write to Josh Zumbrun at Josh.Zumbrun@wsj.com