WASHINGTON — Congressional Democrats cleared a key hurdle on Friday in their effort to sue President Trump over whether he is illegally profiting from business dealings with foreign governments, in a case that could give the lawmakers access to the Trump Organization’s finances.

Judge Emmet G. Sullivan of the United States District Court in Washington ruled that the lawmakers have standing to sue Mr. Trump for accepting payments and other benefits from foreign governments without obtaining permission from Congress, which would violate the Constitution’s clause that bars federal officials from accepting gifts, or emoluments, from foreign powers without congressional approval.

Judge Sullivan dismissed the Justice Department’s claim that the legislators did not have standing to sue and denied its request to dismiss the lawsuit.

“The court finds that the plaintiffs have standing to sue the president for allegedly violating the Foreign Emoluments Clause,” Judge Sullivan wrote in his opinion. Mr. Trump “has neither asked for their consent nor provided them with any information about the prohibited foreign emoluments he has already allegedly accepted.”