What does the gospel have to do with the flood? It does not seem like the language of “good news” and world devastation should appear in the same sentence. In the book of 1 Peter, we have a gospel-centered perspective on the flood narrative.
“…God’s patience waited in the days of Noah, while the ark was being prepared, in which a few, that is,eight persons, were brought safely through water. Baptism, which corresponds to this, now saves you, not as a removal of dirt from the body but as an appeal to God for a good conscience, through the resurrection of Jesus Christ…” (1 Pet 3:20-21).
Note how Peter draws a link between flood and baptism. Just as Noah was rescued through the waters of judgment so we are saved through judgment by the death and resurrection of Christ. Our baptism symbolizes the saving event and this actually corresponds to the flood. Thomas Schreiner in his commentary on 1 Peter has some excellent insights on the connection between flood and baptism.
“The water that deluged the world in Noah’s day and through which Noah was saved functions as a model or pattern for Christian believers. But to what is the water related in the new covenant? The answer is baptism. In fact, we have the surprising statement that “baptism … now saves you.” Before examining that statement, we must consider in what way the flood waters prefigure or correspond to baptism. The waters of the flood deluged the ancient world and were the agent of death. Similarly, baptism, which was by immersion during the time of the New Testament, occurs when one is plunged under the water. Anyone who is submerged under water dies. Submersion under the water represents death, as Paul suggested in Rom 6:3–5. Jesus described his upcoming death in terms of baptism (Mark 10:38–39; Luke 12:50), indicating that submersion under the water aptly portrays death. Just as the chaotic waters of the flood were the agent of destruction, so too the waters of baptism are waters of destruction.”
“In New Testament theology, however (cf. Matt 3:16; Mark 10:38–39; Rom 6:3–5), believers survive the death-dealing baptismal waters because they are baptized with Christ. They are rescued from death through his resurrection (Rom 6:3–5; Col 2:12). Hence, we are not surprised to read in this verse that baptism saves “by the resurrection of Jesus Christ.” The waters of baptism, like the waters of the flood, demonstrate that destruction is at hand, but believers are rescued from these waters in that they are baptized with Christ, who has also emerged from the waters of death through his resurrection. Just as Noah was delivered through the stormy waters of the flood, believers have been saved through the stormy waters of baptism by virtue of Christ’s triumph over death. The word “now” refers to the present eschatological age of fulfillment. With the coming of Jesus Christ the age of salvation has arrived.”
Baptism is a gospel portrayal and a gospel proclamation. When it happens in the church it illustrates the the once for all work of Christ’s death and resurrection that redeems us. By faith we are united to Christ, which means we are connected to his death and resurrection. In baptism, the old man is destroyed and drowned and the new man emerges. The flood in Peter is pressed into the service of the gospel. As we better understand the terrifying justice and overwhelming grace of the flood we will be better positioned to grasp the riches of God’s grace in Christ.
 Schreiner, T. R. (2003). Vol. 37: 1, 2 Peter, Jude. The New American Commentary (193–194). Nashville: Broadman & Holman Publishers.