"unlooked-for acquisition or good fortune," 1812, earlier "a shipwreck" (from the perspective of people living along the coast), by 1806, from Middle English Godes sonde (c. 1200) "God's messenger; what God sends, gift from God, happening caused by God," from God + Middle English sonde "that which is sent, message," from Old English sand, from sendan (see send (v.)).
The common people in Cornwall call, as impiously as inhumanely, a shipwreck on their shores, "a Godsend." [Rev. William Lisle Bowles, footnote in "The Works of Alexander Pope," London, 1806]