In the days leading up to Thanksgiving, millions of Americans in their churches and community celebrations will sing the hymn that has become the de facto anthem of the holiday. “We gather together to ask the Lord’s blessing,” reads the opening stanza of the familiar song, a line that suggests the pluralistic and communal spirit Americans associate with Thanksgiving. As Pilgrims and Native Americans once dined together, so the myth goes, Americans of all races, religions, and creeds still unite to celebrate the country that welcomes everyone.

Yet the opening line of “We Gather Together,” seemingly an apt expression of inclusiveness and shared thankfulness, momentarily distracts from the larger, quieter message the hymn contains. The song’s lyrics, as well as the dark history that inspired them, point to the sinister tradition of violence and expulsion that also runs through the nation’s story, present even in that first Thanksgiving observation.

Though many now see it as a quintessentially American creation, “We Gather Together” actually originated from the religious strife of 16th-century Europe. Following the 1597 Battle of Turnhout, where a Dutch army led by Prince Maurice of Orange defeated Spanish occupying forces in an area now part of Belgium, the poet Adrianus Valerius wrote “Wilt Heden nu Treden” to commemorate the victory, setting the words to an old Dutch folk melody. During the occupation, Dutch Protestants had been barred by the Catholic King Philip II of Spain from meeting with one another for worship. So the gathering together that the song celebrated represented not only the end of religious persecution for the Dutch, but also the reestablishment of sectarian uniformity through the removal of heretical outsiders.

The Pilgrims, who would arrive in Holland shortly after, probably heard the song during their brief time there. But they were unlikely to have brought it with them to Plymouth, as their strict religious practice meant they only sang Psalms directly from the Bible. Instead, the song made its way to this continent with the Dutch who settled in New Amsterdam in the early 1600s, becoming a cherished hymn that generations of Dutch Americans in the Midwest passed down through the centuries and still sung in their native tongue.

The song’s English version—and its connection to Thanksgiving—came from Theodore Baker, an American music scholar who encountered its German translation while studying at the University of Leipzig in the 1870s. In 1894, shortly after his return to the United States, Baker translated the hymn into English, naming it “Prayer of Thanksgiving.” Starting in the early 1900s, Christian denominations began to include it in their hymnbooks.

That song’s new title established its association with the holiday, but World War I and, especially, World War II secured its popularity. Where the hymn’s mention of “the wicked oppressing” referred to the Spanish Catholics in the original Dutch version, Americans began to sing it with the threat of German Nazis in mind, as the music scholar Michael Hawn has argued. The song’s request, “O Lord, make us free,” voiced the plea of a country at war. And once victory had been won, the song offered an expression of gratitude while also evoking America’s strongest sense of itself as God’s chosen nation: “Sing praises to His name, He forgets not his own.”

Born out of a 16th-century battle and finding its permanent cultural status in 20th-century U.S. conflicts, the hymn has connections to war that mirror Thanksgiving’s own link to military strife. While Americans remember the original 1621 Thanksgiving (of which there exists only two primary-source accounts) in their celebrations each year, most have forgotten that it was the Civil War that led to the official holiday. With a country torn apart, Abraham Lincoln had declared the last Thursday of November in 1863 “as a day of thanksgiving and praise” to promote unity. But his proclamation acknowledged it would take the “advancing armies and navies of the Union” and a conquered Confederacy to bind the nation together again.

If war gave Thanksgiving and its unofficial hymn their meaning, it was in the seeming domestic tranquility and relative peacetime abundance of the 1950s that “We Gather Together” reached its cultural apex. Newspapers from the time reveal countless stories of the song being performed to commemorate Thanksgiving at church services, school assemblies, and community pageants across the country. “Nothing is more widely loved,” The New York Times remarked in 1956, than the tradition of singing “We Gather Together” to begin Thanksgiving festivities. At a time when many Protestants and Catholics were caught up in the ecumenical movement to promote Christian unity, the song appeared to represent a spirit of interfaith communion, despite its anti-Catholic origins. And with another war, albeit a “cold” one, shaping the American imagination, singing the hymn as an interreligious anthem of national harmony could be seen as offering a rebuke to the godless Soviets.

Of course, whatever postwar consensus that may have existed at midcentury could not contain the coming reckoning with one of the nation’s deepest sins. In that context, singing “We Gather Together” represented a cruel fantasy in a nation where law and custom segregated white and black Americans. But the song, much like its associated holiday, has often served more for mythmaking than for truth-telling. Indeed, the American celebration of national cohesion at Thanksgiving has always required overlooking how much of the country’s history of gathering together has also depended on equal measures of exclusion and expulsion.

Can a holiday heal a nation? Can a song? Perhaps those questions never had greater urgency than in 1963 when Thanksgiving fell less than a week after the assassination of President John F. Kennedy. In his first address to a joint session of Congress the day before Thanksgiving, the new president Lyndon Johnson quoted the opening line of “We Gather Together” to call for solidarity in a time of tragedy. Newspapers like The Chicago Defender printed the song in full, explaining “His death has cast deep shadows of gloom. … We can only repeat the words of this Hymn.” (Perhaps this connection is why Jacqueline Kennedy Onassis would choose “We Gather Together” as the processional hymn for her funeral in 1994.)

It’s worth noting that the song found its place in U.S. culture at a time when Christians made up a much larger portion of the population than they do now (91 percent in 1948 compared to 71 percent today). As a result, “We Gather Together” can’t be taken for granted as a hymn that will necessarily be meaningful to a vast majority of the country—ironically, a natural outcome of living in a pluralistic society.

While the nation’s divisions today don’t match those of 1863, nor do its traumas compare with those of 1963 (after Kennedy’s assassination), the ties that bind in this Thanksgiving season may feel particularly fragile. Many Americans continue to sing “We Gather Together” each November, but they do so in a nation increasingly riven by hardened political polarization and social stratification. “He chastens and hastens His will to make known,” reads the second line of the Thanksgiving hymn. Reflecting more on those words, Americans might hear the song not as an encouragement for self-satisfied celebration, but rather as a much-needed call to self-correction.