DES MOINES, NOV. 6 -- Democratic presidential hopeful Bruce Babbitt today offered what he called a "no gimmicks" plan to slash the federal deficit by $40 billion this year.

It includes the immediate enactment of a 2.5 percent national sales tax and $20 billion in cuts in domestic and military programs.

The former Arizona governor targeted 25 areas of government spending for cutbacks, saying, "We have to stop pretending that there's some magic answer to the deficit -- painless, costless and free for the taking."

Babbitt made his proposals as Iowa Democrats began gathering here for their biggest political event of the fall, the state party's annual Jefferson-Jackson Day Dinner, which will be on Saturday.

Rep. Richard A. Gephardt (Mo.), another Democratic hopeful, also gave an economic speech today, calling for a permanent international economic alliance comparable to NATO and passage of a controversial Gephardt-sponsored trade bill.

Both Democrats harshly accused President Reagan of failing to provide leadership since the stock market's sharp dive Oct. 19.

"We're in a much more difficult position than anyone cares to imagine," Gephardt told reporters in nearby Ames. "The president is out of it. He isn't dealing with the real problem. He's posturing."

"Nero fiddled. Reagan diddles," Babbitt said.

In a speech at Drake University here, Babbitt called for cutting Reagan's budget request for the Strategic Defense Initiative antimissile system in half, canceling funds for the MX missile and altering the Trident submarine programs, all reductions popular among liberals expected to dominate the Iowa Democratic caucuses Feb. 8.

He said the government could save $600 million in fiscal 1988 by eliminating subsidies to agribusiness, $560 million by clamping down on travel expenses for government workers and $1.3 billion by eliminating tax deductions for business entertainment.

But he also proposed more controversial moves, including taxing employe health-care benefits and Social Security and Medicare benefits for families earning more than $25,000.

Last summer, Babbitt called for a 5 percent national sales tax to be enacted in fiscal 1989 and "needs-tested" cuts in federal spending. Today he detailed where he would like to see the spending cuts made, and called for 2.5 percent sales tax for 1988 in addition to a 5 percent sales tax next year.

Babbitt estimated that the cuts and tax inreases he proposed today would reduce the federal deficit by $404 billion over five years. Of that, $100 billion would come from cuts in domestic spending, $84 billion from military spending cuts and $220 billion from tax increases.

Gephardt's speech today was his second on economic issues this week in Iowa. On Wednesday, he outlined steps "to ensure that the economy does not follow Wall Street into a nose dive. He suggested, for example, that Reagan appoint former Federal Reserve Board chairman Paul A. Volcker as a special economic adviser and bring him into the White House to coordinate economic policy.

Gephardt used the economic speeches to get himself off the defensive on the trade issue. He restated and redefined a controversial trade bill he authored, which critics have labeled "protectionist."

"We're in this mess not because we did something that didn't work in trade, but because we did nothing at all. . . . My amendment is designed to open foreign markets through bilateral negotiations. What we want is to have foreign markets as open to the goods of other countries as our own markets are," he said in his Wednesday speech.