Much has been written about these two poems, to the extent that many scholarly publications nowadays simply take it as a given, not needing justification, that "A Prayer for my Daughter" is a follow-up to "The Second Coming". For example, the opening paragraph of Beryl Rowland, "The Other Father in Yeats's “A Prayer for My Daughter”", Orbis Litterarum 26(1) (1971), pp. 284-290, is:
Yeats’s “A Prayer For My Daughter”’ is rightly regarded as a companion piece to “The Second Coming”, written a few weeks earlier. It offers, on a personal level, a pattern of living which will withstand the onslaught of the monstrous sphinx-like creature threatening to destroy the cultural values of the Christian world. The tempestuous scene in the opening stanza is a microcosm of the larger violence let loose in “The Second Coming”, and within the smaller com- pass the poet describes a means of escape from the “blood-dimmed tide” that will drown the “ceremony of innocence”. Decades replace the centuries, the imminent life of his new-born daughter, the anonymous generations, and from this rocking cradle comes, not the nightmare, but happiness, innocence, and permanence.
Comparisons between the two poems can also be drawn in their differing portrayals of birds:
The relationship between the tree and the tenacious singing birds contrasts with the famous bird images of "The Second Coming," where the falconer loses control of the falcon which has been gyrating above him in ever-widening circles and which, in the' second verse paragraph, generates the desert birds that angrily reel over a slouching monster. The motif of hunting, associated with the falcon, is in "A Prayer for My Daughter" replaced by the playful "chase" ("Nor but in merriment begin a chase"); the "indignant" cries of the desert scavengers cheated of their prey are replaced by the linnet's "magnanimities of sound." The linnet's generous, magnanimous song is pitted against the howling of the storm, the prophetic "frenzied drum" of the future cataclysms, and the "angry bellows" for which Maud Gonne is accused of having bartered her birthright. Maud Gonne, Yeats's Helen of Troy, is invoked as a negative example, almost a control group: her passionate commitments left no place for liberalist irony.
-- Leona Toker, "W B. Yeats's "A Prayer for My Daughter": The Ironies of the Patriarchal Stance", Connotations 9(1) (1999), pp. 100-110
And also in their treatment of innocence as linked with ceremony: cf. the following lines from "The Second Coming" and "A Prayer for my Daughter" respectively:
Mere anarchy is loosed upon the world,
The blood-dimmed tide is loosed, and everywhere
The ceremony of innocence is drowned;
And may her bridegroom bring her to a house
Where all's accustomed, ceremonious;
For arrogance and hatred are the wares
Peddled in the thoroughfares.
How but in custom and in ceremony
Are innocence and beauty born?
Ceremony's a name for the rich horn,
And custom for the spreading laurel tree.
Further discussion of the concepts of innocence, anarchy, etc. shown in these lines of the two poems can be found in John R. Harrison, "What rough beast? Yeats, Nietzsche and historical rhetoric in "The Second Coming"", Papers on Language and Literature 31(4) (1995), 362, including some previous versions of the "ceremony of innocence is drowned" line from earlier drafts of "The Second Coming".
It's also worth noting that in his Collected Poems (1912) Yeats included "A Prayer for my Daughter" immediately after The Second Coming, further indicating the connection between them. Of course, the compositions of these two poems was also close together in time, as you've already indicated in your question: the powerfully mysterious "The Second Coming" written shortly before the birth of his daughter, and the more hopeful and optimistic "A Prayer for My Daughter" written shortly after the birth of his daughter.
A more detailed comparison between these two poems can be found in this blog post, but take it for what it's worth, with its references to "Earnest Hemmingway" and "T. S. Elliott" [sic].