Karl Barth believed in the Virgin Birth, unlike many of his followers and opponents such as Emil Brunner who rejected the Virgin Birth, as well as Wolfhart Pannenberg, Jurgen Moltmann, Rudolf Bultmann and many other. Barth didn't believe in the Virgin Birth due to a pre-commitment to Biblical nativity stories were inerrant like many evangelicals today. Barth believed in the Virgin Birth because he believed that it was an indispensable attestation to the incarnation. Similar to the Empty Tomb after the Resurrection, the Virgin Birth was a sign of the miracle of Christmas.
In the Church Dogmatics IV/1, Karl Barth affirms the Virgin Birth, as he had previously done in the Church Dogmatics I/2. In CD IV/1, Barth explains that the Virgin Birth does not mean that Jesus is the physical Son of God, because there is a great difference between the phrases "Conceived by the Holy Spirit" (Apostles Creed) and "Begotten by the Holy Spirit". Barth argues that Jesus was not physical born from a Holy Marriage between Mary and the Holy Spirit, and Jesus was not formed through normal human reproduction between a human and divine being.Barth argues that Jesus was a creative act of God where Jesus was specially formed in the womb of Mary, and this creative act occurred without any physical human father. Furthermore, this special creation sanctified Mary as the mother of God. Jesus is not physically the son of God. His body is a human body, not a mingling of a divine physical body with a human physical body. Barth says this idea of physical sonship is foreign to the Biblical nativity stories or the early creeds.
Barth argues that Jesus was not begotten in time either and has always had flesh. This point is more challenging to understand, due to Barth's theology of time and eternity. In other words from the beginning Jesus was the Word of God who will be incarnated (logos incarnandus), and a so-called un-incarnated Word of God (logos asarkos) has never existed.
The following famous quotations are from Karl Barth's Church Dogmatics IV.1 The Doctrine of Reconciliation (Study Edition 21) and explains Barth's argument for the Virgin Birth. In this first quotation, Barth explains why Jesus is not the physical son of God:
It certainly will not serve any useful purpose to burden the New Testament, or the Church which followed it, or ourselves, with the idea that Jesus Christ as the Son of God is begotten in time, in an event in which God does that which makes a man a father, and that He was born in consequence of this event as such. When we are dealing with Jesus Christ there is no question of a temporal event in which He began to be the Son of God, of an action on the part of God like that of a human father in which He began to be the Father of this Son, and therefore of a so-called “physical divine Sonship” of Jesus Christ in the fairly well-known sense of so many mythologies. The New Testament and the Church never understood His Sonship in this way. Even in the light of the Old Testament it was impossible to think along these lines. And what confronted the New Testament witnesses and through them the Church, what laid the term “Son of God” on their lips as they looked at Jesus Christ, compelled them to exclude this idea and to think on quite different lines. There is therefore no reason to pursue this thought.
It would have to be imported into the passages in Mt 1:18-25 and Lk 1:26-38 and the credal statement about the Virgin birth in the creeds founded on these passages (cf. for what follows CD I/2 §15.2). And careful exegesis and dogmatics have always safeguarded them against this importation. In the creeds the assertion of the Virgin Birth is plainly enough characterized as a first statement about the One who was and is and will be the Son of God. It is not a statement about how He became this, a statement concerning the basis and condition of His Sonship. It is a description of the way in which the Son of God became man. The New Testament and the early Church never understood the relationship between the Holy Spirit and the Virgin Mary in mythical fashion as a Holy Marriage (ἱερὸς γάμος).
The Holy Spirit has never been regarded or described by any serious Christian theologian as the divine Father even of the man Jesus. 
In the next quotation, Karl Barth explain the Virgin birth as a sign of the incarnation:
It is the sign which accompanies and indicates the mystery of the incarnation of the Son, marking it off as a mystery from all the beginnings of other human existences. It consists in a creative act of divine omnipotence, in which the will and work of man in the form of a human father is completely excluded from the basis and beginning of the human existence of the Son of God, being replaced by a divine act which is supremely unlike a human action which might arise in that connexion, and in that way characterized as an inconceivable act of grace.
"Conceived by the Holy Ghost" does not, therefore, mean "begotten by the Holy Ghost." It means that God Himself—acting directly in His own and not in human fashion—stands at the beginning of this human existence and is its direct author. It is He who gives to man in the person of Mary the capacity which man does not have of himself, which she does not have and which no man could give her. It is He who sanctifies and ordains her the human mother of His Son. It is He who makes His Son hers, and in that way shares with humanity in her person nothing less than His own existence. he gives to her what she could not procure for herself and no other creature could procure for her. This is the miracle of the Virgin Birth as it indicates the mystery of the incarnation, the first attestation of the divine Sonship of the man Jesus of Nazareth, comparable with the miracle of the empty tomb at His exodus from temporal existence. The question is pertinent whether His divine Sonship and the mystery of His incarnation are known in any real seriousness and depth when these attestations are of it are unrecognized or overlooked or denied or explained away. But in any case these attestations are based on His divine Sonship, not His divine Sonship on these attestations. They have a great deal to do with it poetically, but nothing at all ontically. 
- Karl Barth "Church Dogmatics: IV.1 The Doctrine of Reconciliation Study Edition 21" Ed. T. F. Torrance and G.W. Bromiley. Trans. G. W. Bromiley. London: T & T Clark, 2010. Print. pp. 200-01. [pp. 206-207]
Related: Church Dogmatics, Incarnation, Karl Barth, logos asarkos, logos incarnandus, Mary, Virgin Birth