Trump could win the election in a nowcast by FiveThirtyEight

Gerrymandering works by giving the controlling party slim majorities in many districts and concentrating opposition voters in a few districts. So if everyone votes the way they have in the past, the controlling party gets a disproportionate number of seats. But, if those slim majorities slip away, you get a tidal wave going the other direction.

I worked out the math for the case of Ohio: