Germany's top court ruled Wednesday that lawmakers must legally recognize a "third gender" from birth.