Forty-five years after Army troops rounded up thousands of Japanese Americans and forced them into World War II relocation camps, Congress is on the verge of issuing a formal apology to the survivors and offering $1.2 billion to make amends for what a number of legislators this week described as "a deep stain on our Constitution and our history."

Although the Justice Department has opposed the legislation, some sponsors, including the two members of Congress who were held in the camps, said they think that the Reagan administration's opposition is weakening and predicted that the measure will pass both houses next week by wide margins.

"If it gets to the president's desk, it's a new ball game," said Rep. Robert T. Matsui (D-Calif.), a Japanese American who spent his first three years in the camps.

Opposition has focused on cost, but an aide to one of the principal opponents said yesterday there is no optimism about stopping it on the House floor, partly because its sponsors have scheduled the vote Thursday to commemorate the 200th anniversary of the Constitution.

"It's been a long road to get to this point," said Rep. Norman Y. Mineta (D-Calif.), who was shipped out of his hometown of San Jose in 1942 wearing his Cub Scout uniform. He spent three years in the camps.

Since 1984, Mineta has battled to persuade colleagues that the forced relocation of 120,000 Japanese Americans under an executive order signed by President Franklin D. Roosevelt is one of the nation's shames and should be corrected.

"Passage of this legislation is long overdue," said a "Dear Colleague" letter distributed Thursday by a number of House members, ranging from Majority Leader Thomas S. Foley (D-Wash.) to conservatives Henry J. Hyde (R-Ill.) and Patrick L. Swindall (R-Ga.).

Until this spring, the bill had never emerged from a subcommittee. When Rep. Barney Frank (D-Mass.) took charge of the House Judiciary's subcommittee on administrative law, where the bill had been stalled, he made its passage a priority, according to legislators and others who have followed the issue.

"Some people were afraid of it . . . fearful that it might not pass," said Frank, an outspoken civil libertarian. Frank said he found the measure's prospects stronger than its backers had believed.

The House Judiciary Committee voted 28 to 6 on June 17 to send the bill to the floor. The only opponents were conservative Republicans, who objected to costs.

The bill would contain a national apology for the internment, calling it "a gave injustice . . . motivated in part by racial prejudice and wartime hysteria." It would also urge the president to grant pardons to the few individuals who violated a curfew and evacuation notice, amend the federal employment and military records of Japanese Americans who were fired and sent to the camps and establish a trust fund for the survivors and finance research into the protection of civil liberties.

Most significantly, the sponsors said, the bill would provide $20,000 each to any survivor of the camps as compensation for "significant human suffering." To collect, the survivors would have to drop any claim against the government.

A similar Senate bill, sponsored by Sen. Spark M. Matsunaga (D-Hawaii), has 76 cosponsors and would also compensate natives of Alaska's Aleutian Islands who were forced off their lands during the war. Supporters said that, barring an unexpected parliamentary maneuver, the bill should win overwhelming approval in the Senate.

That is likely to leave any decision on the measure up to President Reagan. Justice Department lawyers have called the internment "deplorable" but have attacked the bill in committee and have hinted they will urge Reagan to veto it.

The House bill, called the Civil Liberties Act of 1987, is laden with symbolism for the camps' 60,000 surviving Japanese Americans, most of whom were taken under armed guard to relocation camps after Roosevelt declared that their loyalty was suspect.

The measure is House bill 442, numbered for the 442nd Army Regimental Combat Team composed of Japanese Americans, including Sen. Daniel K. Inouye (D-Hawaii), which served with distinction during the war in Europe.

Although the internment was upheld by the Supreme Court 44 years ago, it since has been condemned by a presidential commission and numerous legal authorities. Papers disclosed after the camps were closed showed that government authorities had no basis for their fears that Japanese Americans were likely to collaborate with the Japanese government.

For decades, the camps were considered a taboo subject among many Japanese Americans, a fact that Mineta and Matsui said may have slowed the government's willingness to address the issue.

"I could not talk about it until seven years ago," said Matsui, who was a 6-month-old infant when he and his parents were ordered out of their Sacramento home and into a camp at Tule Lake, Calif.

Mineta recalled that his parents also had difficulty discussing the internment. He credited the sansei -- the third generation Japanese American -- with forcing the issue. "They were the ones who finally forced their parents to come out of the closet and tell us these stories," he said.

"This will bring a cleansing in the Japanese American community," Matsui said. "This will enable many to say that it was not my fault; it was the government's fault and now they've acknowledged it."

Congressional attitudes toward the bill have changed dramatically, Matsunaga said. "They were so misinformed when we started," he said. "I had two members of the Senate come up to me and say: 'Why should be compensate the Japanese? They were the ones who started the war.'

"I said, 'Give me two minutes.' "