WASHINGTON—The House’s tax-writing committee sued the Treasury Department and the Internal Revenue Service on Tuesday for access to President Trump’s tax returns, hoping federal judges will pry loose records that the administration has refused to hand over.

The lawsuit from the House Ways and Means Committee at last puts the clash into the courts, exactly where Committee Chairman Richard Neal (D., Mass.) and Treasury Secretary Steven Mnuchin have predicted for months that it would land.

Judges...