The origin of wet blanket is very literal. Way back in the day (the 1600's day) it was recommended that people keep a small wet blanket near their fires in case they got out of control. Then they would have a quick way to put the fire out before it got too big or out of control. (source)
Throughout the many years the phrase morphed from literal to figurative and it showed up in 1871 as the way we use it today - someone who spoils other people's fun by failing to join in with or by disapproving of their activities.