Former Defense Secretary Robert Gates left town Thursday with one piece of business left unfinished: formal repeal of the ban on gays serving openly in the military.

Mr. Gates had carefully guided the Pentagon through a lengthy review, designed to prepare the military for repeal of the “Don’t Ask, Don’t Tell” law, identify stumbling blocks to allowing gays to serve, and try to reassure skeptical leaders that the military could embrace the change pushed by President Barack Obama.