A state gets electors for each congressional district and two for their Senators, but I think the allocation for each state is based on the popular state-wide vote. Some states are winner-take-all and some are proportional, but I don't see how gerrymandering could affect the way electors vote.