WASHINGTON—A divided U.S. Senate on Wednesday voted to confirm Vanita Gupta to serve in the No. 3 job at the Justice Department, a role at the forefront of the department’s renewed efforts to combat systemic racism in policing. Gupta won confirmation as President Joe Biden’s associate attorney general in a final vote of 51-49. Only one Republican—Lisa Murkowski of Alaska—voted to confirm her, saying she felt Gupta was personally committed to combating injustice. “I have looked at her record. I have had an extensive sit-down with her. I’m impressed with not only her professional credentials … but the passion that she carries with her with the work that she performs,” Murkowski said. Gupta has faced a fraught confirmation process amid attacks by right-wing groups and Senate Republicans who have criticized her on everything from prior statements she has made on social media to her stock holdings in a company accused of selling a key ingredient …