ATHENS—Greek lawmakers passed a law Tuesday allowing for same sex unions despite opposition from the powerful Church of Greece.

The legislation caused the first rift between the two parties forming the coalition government, left wing Syriza and the small right-wing group Independent Greeks, since September’s elections.

Independent Greeks voted...