That proposal drew strong opposition from the Pentagon and several lawmakers. Gillibrand's plan is likely to get a separate vote, perhaps as early as next month.
The bill would give Obama additional flexibility in deciding the fate of terror suspects at the detention center at Guantanamo Bay, Cuba, but it stops well short of the administration's goal of closing the installation.
Congress has passed a defense policy bill every year since the Kennedy administration, but the 52nd year has been one of the more tortuous as the legislation got caught up in the dispute between Republicans and Democrats over Senate rules and limits on debate.
The White House had expressed support for the legislation, which would provide $552.1 billion for the regular military budget and $80.7 billion for the war in Afghanistan and other overseas operations, a reflection of deficit-driven efforts to trim spending and the drawdown in a conflict lasting more than a decade.
The legislation also would cover combat pay and other benefits, authorize funds for the destruction of chemical weapons in Syria and provide money to study the feasibility of establishing a missile defense site on the East Coast.