The Republican president previously vowed to reject any such bill unless it included $5.7bn (£4.3bn) to fund his signature campaign pledge.
But Democrats, who control the House of Representatives, have flatly refused.
Speaking on day 35 of the shutdown in the White House Rose Garden, Mr Trump said the agreement would fund the government until 15 February.
He said federal workers affected by the political imbroglio, whom he called "incredible patriots", would receive full back-pay.
His statement came as some 800,000 civil servants missed another payday amid the five-week impasse.
BBC
More about: Trump