The independent governor signed the bill Thursday evening, shortly after the House gave final approval to the bill.
Gay and lesbian Rhode Islanders erupted into cheers following the bill's signature.
The first marriages could take place Aug. 1, when the legislation would take effect.
While all other New England states already allow gay marriage, heavily Catholic Rhode Island had been a hold-out, with gay marriage bills failing to pass for nearly 20 years. That changed this year after more gay marriage supporters were elected to the General Assembly and advocates mounted an aggressive lobbying effort.