WASHINGTON—President Trump reached a deal with congressional leaders Friday to reopen the government for three weeks despite getting no new funding for a border wall, setting the stage for whirlwind talks to bridge deep disagreements between Democrats and Republicans on immigration policy.

The bill, which includes an extension of border-security funding at current levels, was quickly passed by the Senate and House and was signed into law by the president late Friday. The short-term deal provides financial relief for about...