The committee voted 5-2 to pass the civil-unions bill after a five-hour hearing that attracted about 200 people and left several Democratic lawmakers in tears.