The Lutheran Confessions teach that baptism is necessary for salvation. Christ also
  says, "He that believeth and is baptized shall be saved." Mark 16.
  However, one hears about the thief on the Cross, as if this event prior to the command
  of baptism in Matthew 28:20, is the exception to the rule that removes the rule. Faith is
  also necessary for salvation, a rule to which there is no exception in the Bible. Yet
  there is no question that the unborn children of Christians, who die in the womb or before
  a reasonable intended date of baptism, have eternal salvation.
  However, many Lutheran pastors, in their attempt not to appear "legalistic,"
  will suggest that baptism is not necessary for salvation, when it most certainly is
  necessary as we see in the following quotations from the Lutheran Confessions.
  Article II: Of Original Sin Page 43
  "Also they teach that since the fall of Adam, all men begotten in the natural way are
  born with sin, that is, without the fear of God, without trust in God, and with
  concupiscence; and that this disease, or vice of origin, is truly sin, even now condemning
  and bringing eternal death upon those not born again through Baptism and the Holy
  Ghost."
  Augsburg Confession Article IX: Of Baptism. Page 47
  "Of Baptism they teach that it is necessary to salvation"
  Apology: Article IX: Of Baptism Page 245
  "The Ninth Article has been approved, in which we confess that Baptism is necessary
  to salvation, and that children are to be baptized, and that the baptism of children is
  not in vain, but is necessary and effectual to salvation."
  The Large Catechism Page 733
  "But, in the first place, we take up Baptism, by which we are first received into the
  Christian Church."
  
  The question is: "What does Luther say on this subject?" What does he say
  about the children of Christians who die in the womb when we see the words, "Baptism
  is necessary for salvation"? Should we say that Baptism is necessary for salvation or
  not? The following quotations from Luther prove most enlightening.
  
  Separate the Word from Baptism, from absolution, and from the Lord's Supper, and they
  will be nothing. LUTHER'S WORKS Vol. 4:272
  This distinction is very necessary; for the heretics-either because they have no
  knowledge of it or disregard it-fall into ugly errors. The conclusion at which Schwenkfeld
  arrives in the following manner is not universally and unqualifiedly true: Nothing
  external is profitable for salvation. Baptism, the preaching of the Gospel, and the Lord's
  Supper are externals; hence they are of no avail for salvation. The major premise is
  clearly false, for one must make a distinction among externals. Some are wholly human and
  have been invented by human beings. Of these the major premise is true. But concerning
  those that have been instituted and commanded by God the major premise is not true; for
  they have been instituted for our salvation, as Christ says about Baptism (Mark 16:16):
  "He who believes and is baptized will be saved," and Paul (Rom. 10:10)"
  "With the mouth confession is made unto salvation." LUTHER'S WORKS Vol.4:273
  But if at times some things happen without the service either of angels or of human
  beings, you would be right in saying: "What is beyond us does not concern us."
  We must keep the ordered power in mind and form our opinion on the basis of it. God is
  able to save without Baptism, just as we believe that infants who, as sometimes happens
  through the neglect of their parents or through some other mishap, do not receive Baptism
  are not damned on this account. But in the church we must judge and teach, in accordance
  with God' s ordered power, that without that outward Baptism no one is saved. Thus it is
  due to God's ordered power that water makes wet, that fire burns, etc. But in Babylon
  Daniel's companions continued to live unharmed in the midst of the fire (Dan. 3:25). This
  took place through God's absolute power, in accordance with which He acted at that time;
  but He does not command us to act in accordance with this absolute power, for He wants us
  to act in accordance with the ordered power. LUTHER'S WORKS Vol. 4:274
  Therefore nobody will obtain salvation through so-called spiritual speculations,
  without external things. Attention must be paid to the Word, and Baptism must be sought.
  The Eucharist must be received, and absolution must be required. All these are indeed
  externals, but they are included in the Word. Hence the Holy Spirit works nothing without
  them. LUTHER'S WORKS Vol. 4:274-275
  Let him who wants to contemplate in the right way reflect on his Baptism; let him read
  his Bible, hear sermons, honor father and mother, and come to the aid of a brother in
  distress. LUTHER'S WORKS Vol. 4:275
  And I stated above that God is able to make a human being out of clay. But a different
  way pleases Him, namely, that you become a husband and take a lawful wife. Thus He would
  be able to teach and enlighten hearts without the ministry of the Word, but He does not
  want to do so. For this reason He has established the external ministry and has instituted
  the sacraments. He is able to forgive sins without Baptism, but He does not do so; for He
  wants us human beings to have a share in His workings. Therefore it would be the height of
  ingratitude to despise these. You must have the same conviction about prayer. For this is
  God's ordered will: He wants to be entreated, and to those who entreat Him He wants to
  give the Holy Spirit and everything they need. LUTHER'S WORKS Vol. 4:288
  
  My conclusion from the Bible, Luther's Works, and the Lutheran Confessions is that we
  should always publicly teach that Baptism is necessary for salvation. However, the God who
  saves, depending on the circumstances and His choice, certainly saves people without
  baptism. He has not given us a list of exceptions. He gave us baptism. We should teach
  that Baptism is necessary for salvation and deal with exceptions, as we might humanly
  conclude they are, on an individual basis. We don't build theology on exceptions but the
  Word of God. 1Peter 3:21 says, "Baptism doth now save us." We look for assurance
  in God's Word and promises.