Ms. Leavitt, 27, who served as his campaign’s press secretary and worked in the White House during his first administration, will be the youngest person ever to assume the role.