Partisan gerrymandering has always been constitutional--it is nothing new. The Constitution clearly gives the function to a political body--the state legislatures--that make political decisions. In the 1960s Democrats refused to redistrict leaving districts very uneven in population. You can find many more examples of actions being undemocratic in past history than today.
As long as those districts are contiguous, approximately the same population, and don't discriminate based on race, the state legislature of a state is free to draw them how they please.
It was the uneven districts that brought about Wesbury v. Sanders (requirement that US House districts be the same as possible in population and Reynolds v. Sims (requirement that state legislative districts be the same as possible in population).