The ruling, if it stands, could prove an important victory for the Democrats, who are hoping redrawn boundaries will not only help them pick up House seats but also energize voters and boost turnout in this longtime battleground state, helping them defeat President Donald Trump. Republican officials said they would appeal.