America's trade deficit, which has been a drag on the economy and has cost the nation millions of manufacturing jobs, showed no sign of easing last month and headed toward a new record that could reach $170 billion, the government said yesterday.

The nation imported $14.2 billion more than it sold overseas in June, the same gap as in May, as the mid-year turnaround forecast by the Reagan administration failed to materialize.

The administration now predicts improvement in the fall, but the 1986 deficit still is expected to exceed last year's record of $148.5 billion; in the first six months, imports exceeded exports by $83.9 billion.

The economy could slip into a recession if the trade deficit fails to shrink within a year, Federal Reserve Board Chairman Paul A. Volcker warned in congressional testimony Tuesday.

Commerce Department estimates show the deficit has cost 2 million jobs since President Reagan took office in 1981.

A fall turnaround in the deficit might be too late for the administration's supporters in critical congressional votes on trade issues. The House, for example, is scheduled to attempt next week to override President Reagan's veto of a textile quota bill. That vote, which as recently as last month was considered an easy win for the president, is now expected to be much closer, as Republican House members desert the administration.

Commerce Secretary Malcolm Baldrige, echoing the view presented Tuesday by Volcker, blamed "overly cautious economic policies abroad" for failing to create "a better alignment of world trade."

The nation continued to lose ground on trade despite a 30 percent decline in the value of the dollar, as measured against currencies of Japan and Western Europe. A lower dollar is supposed to make U.S. products less expensive overseas while raising the price of foreign goods in this country, leading to an improvement in the nation's trading performance.

"The fall in the dollar over the past year is just beginning to help the trade deficit," Baldrige said. "In addition, we need more growth outside the United States to see sustained improvement in the deficit."

The administration has been pressing West Germany and Japan to accelerate their economies, expecting that such a move would stimulate demand for U.S. products.

The continued trade deficit has been blamed by government forecasters for acting as a brake on the economy, contributing to the sluggish 1.1 percent growth rate of the past three months. Despite the lower dollar, domestic demand has absorbed billions of dollars in imports, slowing growth of U.S. industries.

"The national economy, not just a sector or two, is adrift in large part because of the administration's nonexistent trade policy. We can no longer take the recovery for granted. We need strong action now to save it," said Rep. Tony Coelho (D-Calif.), chairman of the Democratic Congressional Campaign Committee. Democrats see the trade deficit as a major campaign issue for the fall congressional elections.

Jerry Jasinowski, executive vice president and chief economist of the National Association of Manufacturers, called the June trade figures "worse than they appear because of increasing oil and manufacturing imports and a stagnant export picture."

"There's no growth abroad. Nobody's buying goods in the rest of the world. They are all trying to sell to the United States," he said.

Farmers and manufacturers suffered in the June tally, which showed the second monthly deficit in agricultural trade in 27 years -- $71.2 million last month on top of a $348.7 million deficit in May -- and the largest deficit of the year in manufactured goods.

The nation's farmers, already hurting from low prices for their bumper crops, are pressing for help, and President Reagan is considering whether to support a bill passed by the Republican-controlled Senate that would allow the sale of subsidized grain to the Soviet Union. The issue has split his administration.

The manufacturing trade deficit continued to grow, reaching the year's high of $12.7 billion last month on increases in sales of foreign cars and textiles and clothing.

Oil imports also increased to $3.1 billion compared with $2.5 billion in June, as the price dipped by 24 cents a barrel, but the amount brought into the country jumped by 2.1 million barrels a day over the average for the previous six months.

All imports, including oil, totaled $33.2 billion, a 4.4 percent increase over the six-month average. Exports reached a high for the year of $19.1 billion, but Jasinowski said the figures were distorted by a $2 billion gold sale by the United States to Japan. The gold is to be used to mint commemorative medals, Commerce officials said.

Because of that sale, the United States for the first time in years ran a higher deficit with Western Europe than with Japan. The deficit with Western Europe was $3.8 billion in June compared with $2.7 billion for each of the three previous months; the deficit with Japan was $3.7 billion, below the $5 billion average for the previous six months.