Labor Day is an annual tip of the cap to workers, an unofficial marker that summer is winding down and schools are starting up, and an excuse for firing up grills across America. People generally know – perhaps just vaguely – that the holiday has something to do with labor unions.

But how and when did we actually get this national holiday?

It’s a tale that involves picnics (yes, even back in the early days of organized labor), state-by-state campaigning by labor groups, and the half-hearted support of a Democratic president.

Workers had begun to form labor unions in response to these changes, and festive public events like parades and picnics were part of their strategy to build wider support.

In 1882, the idea, to borrow a contemporary phrase, went viral. Various unions in New York City were drawing newfound strength from unity – setting up the Central Labor Union to promote their cause.

“On May 14, 1882, a proposal was made at the Central Labor Union meeting that all workers should join together for a ‘monster labor festival’ in early September,” according to a history of the holiday pieced together by researcher Linda Stinson for the United States Labor Department.

By the time the planned date of Sept. 5 rolled around, some 20,000 tickets had been sold by all the participating unions, but it wasn’t at first clear whether the event would be a public-relations success.

“Many of the workers in the parade had to lose a day’s pay in order to participate. When the parade began only a handful of workers were in it, while hundreds of people stood on the sidewalk jeering at them,” according to the Labor Department account.

But workers – jewelers, bricklayers, and more – gradually joined a parade that was estimated at 10,000 marchers by the time it reached the park. The crowd picnicked, listened to speeches, and in the evening watched fireworks and danced.

The road from there to a national holiday took only 12 years.

New York’s Central Labor Union made Labor Day and an annual affair, and helped to promote the idea of a nationwide. “The idea spread with the growth of labor organizations, and in 1885 Labor Day was celebrated in many industrial centers of the country,” according to another Labor Department history.

In 1887 legislatures began creating state-level Labor Days, starting in Oregon. New York, New Jersey, Massachusetts, and Colorado were among the early adopters, and by 1894, nearly two dozen states had the holiday. Pressure was building to make it national.

But the labor movement already had another day associated with it: May 1. May Day was the International Labor Day, and had a significant US following. But the day was associated with a more radical tone. A post on the Massachusetts AFL-CIO website describes the controversy: “Especially after the 1886 Haymarket riot, where several police officers and union members were killed in Chicago, May Day had become a day to protest the arrests of anarchists, socialists, and unionists, as well as an opportunity to push for better working conditions. Samuel Gompers and the AFL saw that the presence of more extreme elements of the Labor Movement would be detrimental to perception of the festival.”

The spring of 1894 featured a bitter labor dispute between workers and the railroad industry – notably the Pullman workers who faced wage cuts in Chicago.

Amid the tension, President Grover Cleveland made a conciliatory gesture toward unions. He was a Democrat but no ally of organized labor. “After violence related to the Pullman railroad strike, President Cleveland and lawmakers in Washington wanted a federal holiday to celebrate labor – and not a holiday celebrated on May 1,” according to a Labor Day history compiled by the National Constitution Center, a museum in Philadelphia.

Labor advocate James Henderson Kyle, a US senator from South Dakota, was a lead sponsor of the 1894 legislation, which made Labor Day a federal holiday on the first Monday of September.

Since then, the labor movement has ebbed and flowed in momentum. The holiday has become entrenched as a bookend to summer. And although union membership is well off its peak, an era of slow wage growth may if anything be reviving organized labor’s popularity.

Gallup recently released data for 2015 showing Americans' approval of labor unions at 58 percent, up five points over the past year and at its highest point since 2008. Still, that level of support is about what’s been typical in the era since 1970.

“The really good news for us is that workers from [age] 18 to 34 support unions by 66 percent,” AFL-CIO president Richard Trumka told reporters at a breakfast hosted by The Christian Science Monitor last week.