Racing against the clock, the White House reached agreement with congressional Republicans late Monday on a deal to prevent across-the-board tax increases and spending cuts to government programs from taking effect at midnight, according to administration and Senate Democratic officials.