The Dow Jones industrial average added 64.15 points, or 0.4 percent, to close at 15,301.26. The index was down as much as 100 points earlier in the day.
The Standard & Poor's 500 index rose 6.94 points, or 0.4 percent, to 1,710.14. The Nasdaq composite rose 23.40 points, or 0.6 percent, to 3,815.27.
The United States will reach the limit of its borrowing authority Thursday, according to estimates from the Treasury Department. If the debt ceiling is not raised, investors fear the U.S. could default on its borrowings in the coming weeks.
Monday's modest gains follow a surge in the market last week on signs of progress between Congressional Republicans and the White House. The Dow jumped 323 points on Thursday, its biggest gain of the year, and rose another 111 points Friday.
Investors continue to express hope that a deal can be reached before the debt crisis causes any lasting damage. In the last few years, political deals over major budget disputes have gone down to the last minute.
"We don't need some well-crafted, detailed deal," said Quincy Krosby, market strategist with Prudential Financial. "We just need to buy some time so they can keep negotiating."
The U.S. government remains partially shut down because House Republicans want to attach conditions to a budget bill that would scale back the country's new health care law. President Barack Obama is insisting that the government be reopened without strings attached. The partial shutdown is entering its third week.
Investors should brace for more volatility this week as long as the debt ceiling remains unresolved, said John Lynch, regional chief investment officer for Wells Fargo Private Bank, which manages $170 billion in assets.
"We're basically trading on the news at this point," Lynch said.
Wall Street also has a busy week of corporate earnings to work through. Coca-Cola, Johnson & Johnson and Citigroup report their results Tuesday.
Bond trading is closed in observance of Columbus Day. Due to the holiday, trading volume was lighter than normal at 2.6 billion shares.
Among stocks making big moves:
— Netflix rose $23.51, or 8 percent, to $324.36 after The Wall Street Journal reported that the video streaming service is in talks to offer its services to cable companies.
— Merck & Co. fell 54 cents, or 1 percent, to $46.75 after another analyst lowered his rating on the drug developer, which recently announced job cuts and is dealing with the expiration of patents protecting key products.