The bill, which now heads to the House of Representatives, could provide the nation's biggest investment in decades in roads, bridges, airports and waterways. Senators also began voting on a follow-up $3.5 trillion spending package that Democrats plan to pass without Republican votes.
"The market is looking at it as part one is a done deal, the market is OK with that," said Ken Polcari, managing partner at Kace Capital Advisors in Boca Raton, Florida.
"I do not believe the market is going to be OK with $3.5 trillion but there is still the possibility they are able to block it, or slow it, and have more conversation so the market isn't focusing on that one yet."
Energy, industrials and materials, which stand to benefit from an economic recovery, were the top performing sectors, while names such as Caterpillar, Deere and Vulcan Materials each rose about 2 percent as they are poised to reap the benefits of infrastructure projects.
The iShares US Infrastructure ETF rose 1.39 percent and the Global X US Infrastructure Development ETF advanced 2.17 percent.
Energy shares also moved higher as crude prices rebounded more than 2 percent.
The Dow Jones Industrial Average rose 172.17 points, or 0.49 percent, to 35,274.02, the S&P 500 gained 6.56 points, or 0.15 percent, to 4,438.91 and the Nasdaq Composite dropped 73.34 points, or 0.49 percent, to 14,786.84.
With new coronavirus cases rising in the United States, progress on the infrastructure package should support the recovery in the world's largest economy.
The rapid spread of the Delta variant has pushed COVID-19 cases and hospitalizations to a six-month high, with cases averaging 100,000 for three days in a row – up 35 percent over the past week.
Investors will also watch inflation numbers this week for more insight into the Federal Reserve's monetary policy plans in the wake of comments from two Fed officials on Monday that inflation was already at a level that could satisfy one portion of the requirement for the beginning of rate hikes.
AMC Entertainment gave up early gains and was last down 5.16 percent even after beating second-quarter revenue estimates as moviegoers returned to its theaters after a year of closures and restrictions.
Kansas City Southern gained 7.4 percent after Canadian Pacific Railway Ltd raised its offer for the U.S. railroad operator by about $2 billion to $27.29 billion.
Advancing issues outnumbered declining ones on the New York Stock Exchange by a 1.17-to-1 ratio; on Nasdaq, a 1.21-to-1 ratio favored decliners.
The S&P 500 posted 50 new 52-week highs and 2 new lows; the Nasdaq Composite recorded 76 new highs and 84 new lows.