Estonia's Parliament on Thursday narrowly passed legislation to legalize gay partnerships, the first such decision by a former Soviet republic.