The Justice Society of America is the world's first superhero team. On the world of Earth-Two (prior to the history-altering Crisis on Infinite Earths), Batman was a member.
Founded in 1940, the group originally came together when the sorcerer Dr. Fate discovered Adolf Hitler's plot to invade America using the mystic power of the Spear of Destiny. After the heroes fought off Hitler's Valkyries and prevented the invasion, President Franklin D. Roosevelt suggested that they stay together as a team. Both Batman and Superman (who were among the first heroes to debut on Earth-Two) took part in this adventure but elected to remain honorary Justice Society members only. They continued their solo careers while occasionally participating in JSA adventures.
The Justice Society had a long and storied career, defending the American homefront from spies, saboteurs, organized crime, and costumed criminals. They initially operated out of a hotel in New York City but later relocated to a brownstone in Batman's own hometown, Gotham City. In the 1950s, pressure from the Senator Joe McCarthy's House Un-American Activities Committee urged the JSA to unmask and reveal their identities to the world. They declined and chose instead to retire.
The Justice Society returned to action decades later and teamed with their successors the Justice League of America (at the time native to the world of Earth-One). They also expanded their membership to include younger heroes, among them Batman's now-grown sidekick Robin and his daughter the Huntress. Tragically, Earth-Two's Batman met his end at the hands of the sorcerer Frederic Vaux, who granted pyrokinetic abilities to a Gotham crook and sent him to destroy the Caped Crusader. The JSA was forced to avenge one of their founding members.
A cosmic event known as the Crisis on Infinite Earths later merged the worlds of the Multiverse into one, resulting in a single universe. In this world, the original 1940s versions of Batman and Robin and the Helena Wayne version of Huntress never existed. They are thus no longer considered Justice Society members in the current DC Universe. The modern Batman (whose career began many decades after his Earth-Two counterpart's) regards the JSA with respect but has never been entirely comfortable with their occasional operations in his city.
A new 52-Earth Multiverse was later born from the similarly cosmic Infinite Crisis. A version of the Earth-2 Batman, Robin, and Huntress have been restored, albeit separate from the mainstream DC Universe.