The Illinois law, which takes effect June 1, is the latest in a series of recent victories for gay rights, coming after Hawaii's governor signed gay marriage into law last week and after New Jersey Governor Chris Christie in October dropped his appeal of a court ruling that legalized same-sex marriages.
"This new law is an epic victory for equal rights in America," Quinn said before signing the bill in a ceremony attended by about 3,000 people, including Chicago Mayor Rahm Emanuel and state leaders.
"Illinois is moving forward," Quinn said. "We are a model for our country. If the Land of Lincoln can achieve marriage equality, so can every other state in the nation."
Illinois state senators voted to legalize gay marriage in February, and the state House followed suit by a slim margin earlier in November.
Illinois currently allows civil unions, which gay rights activists have said does not go far enough.
"When our constitution was written, those who wrote it understood that liberty and equality are not destinations, but they're journeys ...," said state Representative Greg Harris, a Democrat from Chicago and the bill's sponsor.
Afterward, Brenda Lee, 61, and Lee Edwards, 52, of Chicago, together for 10 years, said they planned to marry before the end of 2014. The women were among the first people to be joined in a state civil union.
"I'd tell people I was in a civil union and they'd say, 'What's that?,'" Edwards said. "Love is love. Now our relationship can be recognized as marriage. It doesn't have to be qualified or explained."
The proposal was resisted by some African-American Democratic lawmakers who were under pressure from outspoken black Protestant churches to oppose it. The leadership of the Roman Catholic Church in Illinois also opposed the proposal.
A Catholic bishop in Illinois, Thomas Paprocki of Springfield, said he planned an exorcism ritual to protest the law at the same time as the governor's planned signing on Wednesday.
Opponents had expressed concern that under the proposed gay marriage law, religious organizations that declined to allow their facilities to be used for gay marriages could face lawsuits. The bill signed by Quinn provides safeguards for religious organizations.
"This affects believers in myriad ways - how they live out their faith, how they educate their children and how they operate their businesses," said Tom Brejcha, president of the Thomas More Society, a legal group that focuses on religious liberty questions.
Three protesters held a sign in front of the auditorium where the signing ceremony was held that said, "Homosexual 'Marriage' is against nature's law and nature's God."
A year ago, only six states - Massachusetts, Vermont, New Hampshire, New York, Connecticut and Iowa - plus the District of Columbia recognized same-sex marriage, but the number has since more than doubled.
Maine, Maryland and Washington became the first to extend marriage rights to same-sex couples by popular vote with passage of ballot initiatives last November. Gay marriage also became legal this year in California, Delaware, Minnesota and Rhode Island.
In contrast, voters in more than two dozen states have approved state constitutional provisions that define marriage as a union between a man and a woman, according to the National Conference of State Legislatures.
(Reporting by Mary Wisniewski; Editing by Sandra Maler, Bob Burgdorfer and Steve Olofsky)