What happened in the West during the 19th century was pretty much what you'd expect from a society whose religious and philosophical foundations had been shaken to the root after centuries of overt Christian influence. There were basically three possible responses: to reject Christianity and accept the new humanism wholesale; to try to maintain a balance between the two; or, to maintain complete allegiance to the Christian faith and defend it against the growing number of anti-Christian ideas.
Unfortunately, those in the latter group often reverted to a simple anti-intellectualism that, far from upholding a solid Christian worldview, undermined the faith to which they so desperately clung. Those who didn't go to that extreme often went to another—in their attempt to remain intellectually relevant, many Christian writers and thinkers began to embrace the increasingly unchristian ideas surfacing, and try to collate them with orthodox doctrine. It was a confusing time, and the lines of Christian culture and secular culture began to blur in increasingly bizarre ways.
For one thing, theologians began to adopt the view that science and faith were separate realms, and that each had its own realm of authority on which the other could not infringe. Charles Darwin's theory of general evolution was obviously instrumental in fostering this idea, but other forward strides in practical science like the mechanization of the Industrial Revolution, improvements in medical knowledge, and a growing sense that only what could be observed was "real" were just as influential.
It all went back to Progress, really. The Enlightenment ideal of man's interminable forward movement through the centuries meant that things were getting better, and with things demonstrably getting better it was hard for many to argue. Because many of the philosophical ideas that accompanied scientific progress were rooted in humanism rather than Christianity, people assumed the two were incompatible to some degree, and to be reconciled they had to be separated.
Not everyone was happily devoted to Progress, however. One of the 19th century's dominant literary movements was devoted to the opposite. Romanticism was as much a child of the Enlightenment as scientism, but instead of going forward they grasped Rousseau's idea that man is at his best when at his most natural, and went backward. Or tried—praising nature, deriding civilization and technology, and pursuing free love is easier evoked in poetry than practiced in real life, as its leaders soon discovered. Still, men like Lord Byron, Percy Bysshe Shelley, and Samuel Taylor Coleridge left behind some of the greatest verse ever written.
The Victorians were certainly influenced by Romanticism and the Enlightenment, but they were a little more balanced. Writers like Charles Dickens (possibly the greatest novelist of all time) and William Makepeace Thackeray combined Christian themes, satire, social activism and a heightened aesthetic sense to simultaneously comment on and delight the culture at large. In many ways the novel came into its own during this period, though some of its best practitioners were still 50-100 years in the future.
In the New World a particularly American version of Romanticism took hold. Transcendentalism as espoused by Herman Melville, Walt Whitman, and Henry David Thoreau was less organized than its Continental counterpart. It was also less rooted in Western tradition, at least, in the Classical Western tradition; the Transcendentalists preferred biblical symbolism, particularly the Old Testament with its often unsettling and apocalyptic imagery.
No era can claim a single literary or intellectual trajectory, but each phase in human history has its own zeitgeist, the spirit of the age. For the 19th century it was the final shift of authority away from any Divine source and onto the shoulders of man. There were great Christian writers who tried to stem the tide (Robert Browning, R. L. Dabney, Charles Haddon Spurgeon, and Charles Ryrie come readily to mind), but secular man was having his heyday and mostly prevailed in the public sphere.
Without the 19th century we wouldn't have most of the fiction genres we enjoy now. Mystery and detective fiction, science fiction, fantasy, escapist adventure novels, realistic historical fiction, etc., all came into being between the beginning of the French Republic and the founding of Major League Baseball. Whatever your opinion of the ideas rampant in these works, these are some of the best philosophical treatises, novels, poems, short stories, and essays history has to offer.