WASHINGTON—Key senators on Tuesday forged a bipartisan compromise to give Congress review power over a final nuclear deal with Iran, winning the endorsement of a reluctant White House and easing a standoff over lawmakers’ role in the talks.

The White House said President Barack Obama would sign the legislation, which was approved unanimously by the Senate Foreign Relations Committee on Tuesday after lawmakers made changes to the bill that administration officials said mitigated their concerns. The measure sets up an expedited framework for Congress to review and potentially vote on a final agreement with Iran this summer.

Accepting the Senate compromise could spare Mr. Obama from the embarrassment of the Senate overriding a veto of the bill, which was written by the panel’s chairman, Sen. Bob Corker (R., Tenn.). Such an override would have been the first of Mr. Obama’s presidency.

The legislation, if enacted, would represent a rare assertion of congressional power over a foreign-policy matter that the White House would have preferred to handle alone. Lawmakers have argued they should be able to weigh in on a deal hinging on the removal of congressional sanctions on Iran. While Congress has the power to authorize the use of force and the Senate has approval power over treaties, recent administrations have increasingly turned to implementing their global agenda in ways that don’t rely on congressional approval.

The White House had urged Democrats to reject the bill, but started signaling it could soften its opposition as the legislation won support from an increasing number of Democrats. The legislation on Tuesday appeared to have more than the 67 votes needed in the Senate to override a presidential veto.