WASHINGTON—Senate negotiators and the Trump administration worked to clear remaining hurdles for a deal on an estimated $2 trillion stimulus package, a massive bill designed to shield the U.S. economy from the most drastic consequences of the coronavirus pandemic.

Stocks rallied on the news that a deal was near, with the Dow Jones Industrial Average surging more than 11%, its best day since 1933.

Lawmakers,...