Gallagher was a member of the New York State Assembly (Kings Co., 4th D.) in 1895.
For some years he was the secretary of the Bush Terminal Company of Brooklyn.
Subsequently, he moved to a law firm Dykman, Oeland & Khune also in Brooklyn.
On January 2, 1913, he was appointed by Mayor William Jay Gaynor as President of the New York City Civil Service Commission after being an Examiner for the commission for thirteen years.
He died on June 11, 1932, in the French Hospital in Manhattan, of a "heart attack".