The Catechism says:
1652 "By its very nature the institution of marriage and married love is ordered to the procreation and education of the offspring and it is in them that it finds its crowning glory."162
Children are the supreme gift of marriage and contribute greatly to the good of the parents themselves. God himself said: "It is not good that man should be alone," and "from the beginning [he] made them male and female"; wishing to associate them in a special way in his own creative work, God blessed man and woman with the words: "Be fruitful and multiply." Hence, true married love and the whole structure of family life which results from it, without diminishment of the other ends of marriage, are directed to disposing the spouses to cooperate valiantly with the love of the Creator and Savior, who through them will increase and enrich his family from day to day.1631653 The fruitfulness of conjugal love extends to the fruits of the moral, spiritual, and supernatural life that parents hand on to their children by education. Parents are the principal and first educators of their children.164 In this sense the fundamental task of marriage and family is to be at the service of life.165
1654 Spouses to whom God has not granted children can nevertheless have a conjugal life full of meaning, in both human and Christian terms. Their marriage can radiate a fruitfulness of charity, of hospitality, and of sacrifice.
1660 The marriage covenant, by which a man and a woman form with each other an intimate communion of life and love, has been founded and endowed with its own special laws by the Creator. By its very nature it is ordered to the good of the couple, as well as to the generation and education of children. Christ the Lord raised marriage between the baptized to the dignity of a sacrament (cf. CIC, can. 1055 § 1; cf. GS 48 § 1).
1661 The sacrament of Matrimony signifies the union of Christ and the Church. It gives spouses the grace to love each other with the love with which Christ has loved his Church; the grace of the sacrament thus perfects the human love of the spouses, strengthens their indissoluble unity, and sanctifies them on the way to eternal life (cf. Council of Trent: DS 1799).
1664 Unity, indissolubility, and openness to fertility are essential to marriage....; the refusal of fertility turns married life away from its "supreme gift," the child (GS 50 § 1).
[162 GS 48 § 1; 50. 163 GS 50 § 1; cf. Gen 2:18; Mt 19:4; Gen 1:28. 164 Cf. GE 3.]
GS stands for Gaudium et spes or The Church in the Modern World. The Catechism is available online--click "Catechism".
While a married couple's cooperation in God's act of creation is essential to the sacrament of marriage, there are other components to marriage. No Catholic denies this, nor does the Church state anywhere that marriage is only for procreation. However, the marriage sacrament is invalid if the intent or desire for having children is not a part of it. And, of course, infertility is not a sin--never was, never will be. As guilty as a couple may feel about it, it is beyond their control. In my second grade class we teach that for something to be a sin, one must know it is wrong and choose to do it anyway. Infertility is not chosen, therefore it is not a sin. I hope that helps put that silly comment to rest.