The aggressive gerrymandering measure, which could net Democrats four congressional seats, passed in a 50% to 49% vote.