This has often been attributed to de Tocqueville's Democracy in America, but erroneously, according to "The Tocqueville Fraud" in The Weekly Standard (13 November 1995). This quote dates back to at least 1922 (Herald and Presbyter, September 6, 1922, p. 8)
There's an earlier variant, without the memorable ending, that dates back to at least 1886:
I went at your bidding, and passed along their thoroughfares of trade. I ascended their mountains and went down their valleys. I visited their manufactories, their commercial markets, and emporiums of trade. I entered their judicial courts and legislative halls. But I sought everywhere in vain for the secret of their success, until I entered the church. It was there, as I listened to the soul-equalizing and soul-elevating principles of the Gospel of Christ, as they fell from Sabbath to Sabbath upon the masses of the people, that I learned why America was great and free, and why France was a slave. | Empty Pews & Selections from Other Sermons on Timely Topics, Madison Clinton Peters; Zeising, 1886, p. 35
More quotes by Alexis de Tocqueville
All Alexis de Tocqueville quotes →
Attribution
Quote text and notes from Wikiquote: Alexis de Tocqueville (page history), available under CC BY-SA 4.0. Source quality and labels are our own summary of what Wikiquote records.