In the very conservative Douglas County, Colorado, people sometimes told me, angrily, that the library was "socialist." That's libertarian shorthand for "an unnecessary program that steals my money through taxes." But we won't get very far if we allow those opposed to our aims to define our terms.
First, as I hope to make clear (in the book I'm working on), libraries are not only important, but a staggering return on investment. And taxation is not theft; it is a well-tested mechanism for a people to pay for essential services that don't easily lend themselves to short-term profit (think public roads, sanitation, court systems, etc.).
Second, a more precise definition of socialism is "a way of organizing a society in which major industries are owned and controlled by the government rather than by individual people and companies." Typically, socialism requires both the "production and distribution of goods" to be managed by the government.
By this definition, there are ways in which the label does apply: the assets of the public library are in fact collectively held; they belong not to one person, but to the larger community. Further, the public library (in the United States of America) is typically a unit of government, either municipal, county, or (in the case of "district libraries,") subdivisions of the state. Public libraries are publicly accountable, and "equal access to all" is the point. So the distribution of goods is also shared.
But there is a fundamental way in which the library is not socialist: the production of goods. While some libraries do indeed produce books (a trend that will grow), and it could be argued that the provision of public space and programs is often "produced" by library staff, the overwhelming stock of the library is and will continue to be produced by others: mainly individuals, but also (as in newspapers, magazines, and electronic resources) by corporations. The public sector invests in the private; the private sector (through taxes and philanthropy) invests in the public.
All economies are a mix of capitalism and socialism. So the library is both socialist and non-socialist. And while that truth may trouble some uncompromising libertarians, most people are more concerned with the efficacy and value of an institution than its ideological purity.