The bill is expected to pass the state House of Representatives in a vote that could take place next week, The Seattle Times reported. Gov. Christine Gregoire has been lobbying in support of the measure.
While senators mostly followed party lines in Wednesday's vote, four Republicans supported the law, including two who had not announced their intentions in advance.
Same-sex marriage is legal in six states and the District of Columbia. Washington would be the third state to legalize it through legislation.
The Washington law would allow state residents and gay couples who are in a legal civil union or domestic partnership from another state to marry. It changes the state's definition of marriage to a union involving two persons.
State Sen. Ed Murray, a Seattle Democrat who has been trying to get a law passed for a decade, welcomed Wednesday's vote.
"A lot of people are just stunned, particularly people my age and older, to think this day would actually come in our lifetime," Murray said just before the vote.
Notable deaths of 2014 [PHOTOS]