The plan would add billions for the Pentagon and border security, although not provide any money for President Donald Trump's promised border wall with Mexico. Chuck Schumer, D-N.Y., released a statement saying the deal reflects the Democrats' principles.
That set in motion a scramble to reach a bipartisan compromise on new legislation to keep the money flowing through fiscal 2017, which ends September 30.
The new spending bill is expected to be on the House and Senate floors in the coming days.
Pelosi said the bill includes more than $1 billion in permanent health benefits for retired coal miners and their families, additional funds to fight the epidemic of opioid addiction, and more money for Puerto Rico's Medicaid program, which was expected to run out of funds this year. The House and Senate have until midnight Friday to pass the measure and thereby avert a government shutdown.More news: French court refuses to extradite Kosovo ex-prime minister
The budget does not include a down payment on a wall along the US-Mexico border, one of Trump's main promises on his campaign.
Senator Chuck Schumer of NY says the pact is a "good agreement for the American people, and takes the threat of a government shutdown off the table". The health-care fight became tangled last week in spending talks as leaders anxious that forcing a vote to repeal the Affordable Care Act risked angering Democrats whose votes are necessary to avoid a government shutdown.
On his 100th day in office, President Donald Trump discusses his new role with CBS News' John Dickerson in an interview at the White House.
Mr Trump said at almost every campaign stop past year that Mexico would pay for the 2,000-mile border wall, a claim Mexican leaders have repeatedly rejected. If the congress succeeds in voting in the bill, then it will mean that the department of finance will spend more than $1 trillion between now and September.More news: Being US President 'big burden on the family'
Schumer says the measure ensures that "taxpayer dollars aren't used to fund an ineffective border wall".
Leaders worked last week to determine if there are enough votes in the House to pass a revised health care bill brokered by the White House, the head of the conservative House Freedom Caucus and a top member of the moderate Tuesday Group. But Democrats pushed back and were hopeful that the measure would not contain many items they deemed "poison pills". In the House, Republican leaders need help from Democrats because some conservatives will oppose any bill that increases spending.
Full details of the agreement on a spending bill are yet to be made public.
GOP leaders also did not try to use the must-do spending bill to "defund" Planned Parenthood and the White House backed away from language to take away grants from "sanctuary cities" that do not share information about people's immigration status with federal authorities.More news: Murray loses to Thiem in Barcelona Open semifinals