WASHINGTON — A federal judge handed a victory to House Democrats on Friday when she ruled that they were legally engaged in an impeachment inquiry, a decision that undercut President Trump’s arguments that the investigation is a sham.

The declaration came in a 75-page opinion by Chief Judge Beryl A. Howell of the Federal District Court in Washington. She ruled that the House Judiciary Committee was entitled to view secret grand jury evidence gathered by the special counsel, Robert S. Mueller III.

Typically, Congress has no right to view such evidence. But in 1974, the courts permitted lawmakers to see such materials as they weighed whether to impeach President Richard M. Nixon. The House is now immersed in the same process focused on Mr. Trump, Judge Howell ruled, and that easily outweighs any need to keep the information secret from lawmakers.

And in a rebuke to the Trump administration, she wrote that the White House strategy to stonewall the House had actually strengthened lawmakers’ case. She cited Mr. Trump’s vow to fight “all” congressional subpoenas and an extraordinary directive by his White House counsel, Pat A. Cipollone, that executive branch officials should not provide testimony or documents to impeachment investigators.