Known as the Sullivan Ordinance, it was passed January 21, 1908 -- and it applied only to women -- and it lasted only two weeks, whereupon the mayor vetoed it. But it goes to show you just how long the smoking issue has been a contentious one (and how sexist we were a century ago). There's a great article about the ban in the Jan 21, 1908 New York Times, available from their archives in PDF format, but I wanted to include some of its juicier passages here.
After to-day it will be against the law for a hotel or restaurant proprietor, or anyone else managing or owning a "public place" to allow women to smoke in public.
Like modern anti-smoking ordinances, this one sought to punish not the smokers, but the establishments which permitted it. One exception was noted: that "just before New Year's Eve ... in certain restaurants smoking by women would be permitted."
The NYT article is an account too of the meeting of the city aldermen who approved the ordinance, and in relating the comments of those present at the meeting, it cleared up one of my basic questions about the law -- why only women?
Dr. Charles J. Pease wanted an amendment making it a crime for "any person or persons" to smoke in a public place where there were women, who ought not to be forced to inhale tobacco fumes.
Fascinatingly, the article goes on to reveal that this was far from the first anti-smoking bill brought to bear in New York -- and that there was a similar kerfuffle all the way back in the Dutch times:
Alderman Doull ... recalled old William Kieft, Governor of New Amsterdam, who tried to prohibit all smoking, and how the burghers sat around his house and actually smoked him out.