The bill would make Illinois the 10th US state, plus the District of Columbia, to allow gay marriage.
One Republican voted for the measure. Senator Jason Barickman said he was supporting the bill because of an amendment that would protect churches opposed to same-sex marriage from recognising them.
The state House will next consider the bill and, if successful, it will go to Governor Pat Quinn, a Democrat, who has indicated he would sign the bill.
The Chicago Sun Times reports that Quinn, Chicago Mayor Rahm Emanuel and US President Barack Obama have all called on the General Assembly to legalise gay marriage in the state.
Similar bills are currently working their way through three US states, including Rhode Island, Hawaii and Delaware.