It is said in the Catechism of the Catholic Church that the “Church makes a moral judgment about economic and social matters, ‘when the fundamental rights of the person or the salvation of souls requires it,’” and “strives to inspire right attitudes with respect to earthly goods and in socio-economic relationships.”  (Catechism of the Catholic Church [CCC] 2420) The “social doctrine of the Church developed in the nineteenth century when the Gospel encountered modern industrial society with its new structures for the production of consumer goods, its new concept of society, the state and authority, and its new forms of labor and ownership.” (CCC 2421) This “social teaching comprises a body of doctrine, which is articulated as the Church interprets events in the course of history, with the assistance of the Holy Spirit, in the light of the whole of what has been revealed by Jesus Christ.”
In a recent article for The Catholic Thing called “The Myth of Catholic Social Teaching”  John Zmirak calls into question the very existence of a coherent body of Catholic social doctrine that is morally binding on Catholics. What he appears to find particularly irksome is the fact that while the Church “has rejected the totalitarian and atheistic ideologies associated in modem times with ‘communism’ or ‘socialism,’” she has also “refused to accept, in the practice of ‘capitalism,’ individualism and the absolute primacy of the law of the marketplace over human labor.” Regulating the economy “solely by the law of the marketplace,” the Catechism says, “fails social justice, for ‘there are many human needs which cannot be satisfied by the market.’ Reasonable regulation of the marketplace and economic initiatives, in keeping with a just hierarchy of values and a view to the common good, is to be commended.” (CCC 2425)
Mr. Zmirak has raised an important point that should be explored. Are Catholics free to reject Catholic social doctrine without compromising their religion? There are Catholics who oppose certain aspects of Catholic social teaching. Does it constitute dissent to do so?
The infallibility promised to the Church is “‘present in the body of bishops when, together with Peter's successor, they exercise the supreme Magisterium,’ above all in an Ecumenical Council.”  (CCC 891) The Second Vatican Council produced two documents that make up part of the body of Catholic social doctrine: Dignitatis Humanae and Gaudium et Spes. In Gaudium et Spes we find statements like this:
“Many people, especially in economically advanced areas, seem, as it were, to be ruled by economics, so that almost their entire personal and social life is permeated with a certain economic way of thinking. Such is true both of nations that favor a collective economy and of others. At the very time when the development of economic life could mitigate social inequalities (provided that it be guided and coordinated in a reasonable and human way), it is often made to embitter them; or, in some places, it even results in a decline of the social status of the underprivileged and in contempt for the poor. While an immense number of people still lack the absolute necessities of life, some, even in less advanced areas, live in luxury or squander wealth. Extravagance and wretchedness exist side by side. While a few enjoy very great power of choice, the majority are deprived of almost all possibility of acting on their own initiative and responsibility, and often subsist in living and working conditions unworthy of the human person.” (63) 
“Growth is not to be left solely to a kind of mechanical course of the economic activity of individuals, nor to the authority of government. For this reason, doctrines which obstruct the necessary reforms under the guise of a false liberty, and those which subordinate the basic rights of individual persons and groups to the collective organization of production must be shown to be erroneous.” (65)
“Among the basic rights of the human person is to be numbered the right of freely founding unions for working people. These should be able truly to represent them and to contribute to the organizing of economic life in the right way. Included is the right of freely taking part in the activity of these unions without risk of reprisal. Through this orderly participation joined to progressive economic and social formation, all will grow day by day in the awareness of their own function and responsibility, and thus they will be brought to feel that they are comrades in the whole task of economic development and in the attainment of the universal common good according to their capacities and aptitudes.” (68)
“God intended the earth with everything contained in it for the use of all human beings and peoples. Thus, under the leadership of justice and in the company of charity, created goods should be in abundance for all in like manner. Whatever the forms of property may be, as adapted to the legitimate institutions of peoples, according to diverse and changeable circumstances, attention must always be paid to this universal destination of earthly goods. In using them, therefore, man should regard the external things that he legitimately possesses not only as his own but also as common in the sense that they should be able to benefit not only him but also others. On the other hand, the right of having a share of earthly goods sufficient for oneself and one's family belongs to everyone. The Fathers and Doctors of the Church held this opinion, teaching that men are obliged to come to the relief of the poor and to do so not merely out of their superfluous goods. If one is in extreme necessity, he has the right to procure for himself what he needs out of the riches of others. Since there are so many people prostrate with hunger in the world, this sacred council urges all, both individuals and governments, to remember the aphorism of the Fathers, ‘Feed the man dying of hunger, because if you have not fed him, you have killed him,’ and really to share and employ their earthly goods, according to the ability of each, especially by supporting individuals or peoples with the aid by which they may be able to help and develop themselves.
“In economically less advanced societies the common destination of earthly goods is partly satisfied by means of the customs and traditions proper to the community, by which the absolutely necessary things are furnished to each member. An effort must be made, however, to avoid regarding certain customs as altogether unchangeable, if they no longer answer the new needs of this age. On the other hand, imprudent action should not be taken against respectable customs which, provided they are suitably adapted to present-day circumstances, do not cease to be very useful. Similarly, in highly developed nations a body of social institutions dealing with protection and security can, for its own part, bring to reality the common destination of earthly goods. Family and social services, especially those that provide for culture and education, should be further promoted. When all these things are being organized, vigilance is necessary to present the citizens from being led into a certain inactivity vis-a-vis society or from rejecting the burden of taking up office or from refusing to serve.” (69)
Thus it appears that there are some parts of Catholic social teaching that have been pronounced infallibly. Of course, Vatican II is a much maligned council in some circles, and desperation may drive some to deny the infallibility of Guadium et Spes on formal grounds. It may be argued that when “the Church through its supreme Magisterium proposes a doctrine ‘for belief as being divinely revealed,’ and as the teaching of Christ, the definitions ‘must be adhered to with the obedience of faith,’” (CCC 891) and not otherwise. Such an argument will assert that there is insufficient language in Guadium et Spes to invoke its infallibility, since there is no specific claim that its contents are divinely revealed and the teaching of Christ. But such an argument would exalt form over substance. The infallibility of the Church doesn’t arise from the incantation of magic words. Vatican II was an ecumenical council, and Guadium et Spes was inarguably a statement on morals. Any attempt to soften, let alone avoid, its authoritative import by the use of clever legal niceties is not to be recommended.
Even if there was merit to such an argument, Guadium et Spes would at the very least be an exercise the Church’s ordinary Magisterium, and, thus, be authoritative for Catholics. As the Catechism says, divine “assistance is also given to the successors of the apostles, teaching in communion with the successor of Peter, and, in a particular way, to the bishop of Rome, pastor of the whole Church, when, without arriving at an infallible definition and without pronouncing in a ‘definitive manner,’ they propose in the exercise of the ordinary Magisterium a teaching that leads to better understanding of Revelation in matters of faith and morals. To this ordinary teaching the faithful ‘are to adhere to it with religious assent’ which, though distinct from the assent of faith, is nonetheless an extension of it.” (CCC 892) The writings of the popes on Catholic social teaching going back to Pope Leo XIII’s Rerum Novarum are in this category
But what is this “religious assent”? The answer to this is also found in the documents of the Second Vatican Council, this time from Lumen Gentium:
“Among the principal duties of bishops the preaching of the Gospel occupies an eminent place. For bishops are preachers of the faith, who lead new disciples to Christ, and they are authentic teachers, that is, teachers endowed with the authority of Christ, who preach to the people committed to them the faith they must believe and put into practice, and by the light of the Holy Spirit illustrate that faith. They bring forth from the treasury of Revelation new things and old, making it bear fruit and vigilantly warding off any errors that threaten their flock. Bishops, teaching in communion with the Roman Pontiff, are to be respected by all as witnesses to divine and Catholic truth. In matters of faith and morals, the bishops speak in the name of Christ and the faithful are to accept their teaching and adhere to it with a religious assent. This religious submission of mind and will must be shown in a special way to the authentic magisterium of the Roman Pontiff, even when he is not speaking ex cathedra; that is, it must be shown in such a way that his supreme magisterium is acknowledged with reverence, the judgments made by him are sincerely adhered to, according to his manifest mind and will. His mind and will in the matter may be known either from the character of the documents, from his frequent repetition of the same doctrine, or from his manner of speaking.” (25) 
Since Rerum Novarum, the teachings of the popes on the social doctrine of the Church have been consistent. Catholics must adhere to those teachings, even if they cannot be said to be infallible.
But Mr. Zmirak points out that there are specific examples of changes in the teaching of the popes on social questions throughout history. Even though he appears to have mischaracterized the history of papal teaching on slavery , his general point is true, and anything that is not infallible might well contain mistakes. How are we to give religious assent to papal statements which might partly be in error?
The answer is found in a document entitled Donum Veritatis that was issued in 1990 by the Congregation for the Doctrine of the Faith, and was intended as a guide for theologians. Regarding a theologian’s disagreement with the ordinary Magisterium the document says this:
“Finally, in order to serve the People of God as well as possible, in particular, by warning them of dangerous opinions which could lead to error, the Magisterium can intervene in questions under discussion which involve, in addition to solid principles, certain contingent and conjectural elements. It often only becomes possible with the passage of time to distinguish between what is necessary and what is contingent.
“The willingness to submit loyally to the teaching of the Magisterium on matters per se not irreformable must be the rule. It can happen, however, that a theologian may, according to the case, raise questions regarding the timeliness, the form, or even the contents of magisterial interventions. Here the theologian will need, first of all, to assess accurately the authoritativeness of the interventions which becomes clear from the nature of the documents, the insistence with which a teaching is repeated, and the very way in which it is expressed.
“When it comes to the question of interventions in the prudential order, it could happen that some Magisterial documents might not be free from all deficiencies. Bishops and their advisors have not always taken into immediate consideration every aspect or the entire complexity of a question. But it would be contrary to the truth, if, proceeding from some particular cases, one were to conclude that the Church's Magisterium can be habitually mistaken in its prudential judgments, or that it does not enjoy divine assistance in the integral exercise of its mission. In fact, the theologian, who cannot pursue his discipline well without a certain competence in history, is aware of the filtering which occurs with the passage of time. This is not to be understood in the sense of a relativization of the tenets of the faith. The theologian knows that some judgments of the Magisterium could be justified at the time in which they were made, because while the pronouncements contained true assertions and others which were not sure, both types were inextricably connected. Only time has permitted discernment and, after deeper study, the attainment of true doctrinal progress.” (24) 
While acknowledging that “deficiencies” might appear in Magisterial documents, the Congregation reminds theologians of the divine assistance given to the Church. Moreover, it makes clear that the “willingness to submit loyally to the teaching of the Magisterium on matters per se not irreformable must be the rule.” Documents of even the ordinary Magisterium are not to be regarded simply as exemplars of “Catholic literary tradition” as Mr. Zmirak suggests. The document goes on:
“If, despite a loyal effort on the theologian's part, the difficulties persist, the theologian has the duty to make known to the Magisterial authorities the problems raised by the teaching in itself, in the arguments proposed to justify it, or even in the manner in which it is presented. He should do this in an evangelical spirit and with a profound desire to resolve the difficulties. His objections could then contribute to real progress and provide a stimulus to the Magisterium to propose the teaching of the Church in greater depth and with a clearer presentation of the arguments.
“In cases like these, the theologian should avoid turning to the ‘mass media’, but have recourse to the responsible authority, for it is not by seeking to exert the pressure of public opinion that one contributes to the clarification of doctrinal issues and renders service to the truth.” (30)
If Mr. Zmirak has difficulties with Catholic social teaching, that is, the parts of it that are reformable, he should not presume privileges that the theologians of the Church do not enjoy. He should not take to the internet and encourage Catholics to disregard Catholic social doctrine in its entirety. Instead, he should make his concerns known to the Magisterial authorities, and do so with “a profound desire to resolve the difficulties.” As to those parts of Catholic social doctrine which are not reformable, those that appear in the documents of Vatican II, he is on extremely dangerous ground; in denying them to be sure, but even more so in his encouragement of his brothers and sisters in the Catholic faith to do likewise.