The Connecticut House and Senate have voted overwhelmingly to confirm a state judge nominee who was opposed by the National Rifle Association and other groups because she supported a gun control bill approved in the wake of the Newtown school shooting.