WASHINGTON—The Senate passed a resolution blocking President Trump from using military force against Iran without congressional authorization, in the latest bipartisan effort on Capitol Hill to rein in presidential war-making powers.

The resolution passed the GOP-controlled Senate, 55 to 45—with eight Republicans joining the Democrats—despite opposition from Mr. Trump and Senate Majority Leader Mitch McConnell. The Democratic-controlled House has indicated it will take up the resolution, which doesn’t prevent the U.S. from responding in the event of an attack.

Thursday’s vote fell short of the two-thirds majority necessary to overcome a promised veto by the White House. It nevertheless again illustrated the willingness of some Republicans to break from Mr. Trump on foreign policy, even if they largely remained aligned with the administration on most other issues.

In the last year, Republicans have joined Democrats to challenge the Trump administration on several foreign-policy measures. Nearly 130 House Republicans voted to oppose Mr. Trump’s decision to withdraw troops from Syria last year. Bipartisan majorities in the House and Senate also have approved resolutions that aimed to withdraw U.S. support for a Saudi-led coalition in Yemen and block arms sales to Saudi Arabia. Mr. Trump vetoed both of them.

In addition, the House last month voted to repeal the authorization for the use of military force in Iraq.