The Catechism of the Catholic Church sums it up:
The term "flesh" refers to man in his state of weakness and mortality.1
1Cf. Gen. 6:3 ["My spirit shall not remain in human beings forever, because they are only flesh"], Ps. 56:5 ["What can mere flesh do to me?"], Isa. 40:6 ["All flesh is grass, and all their loyalty like the flower of the field"]
In the Catechism's section on the Ninth Commandment (paragraphs 2514–33), the authors elaborate a bit more:
Etymologically, "concupiscence" [a synonym for "covetousness", referring to the text of the commandment: "You shall not covet your neighbor's ..."] can refer to any intense form of human desire. Christian theology has given it a particular meaning: the movement of the sensitive appetite contrary to the operation of the human reason. The apostle St. Paul identifies it with the rebellion of the "flesh" against the "spirit." Concupiscence stems from the disobedience of the first sin. It unsettles man’s moral faculties and, without being in itself an offense, inclines man to commit sins.
Because man is a composite being, spirit and body, there already exists a certain tension in him; a certain struggle of tendencies between "spirit" and "flesh" develops. But in fact this struggle belongs to the heritage of sin. It is a consequence of sin and at the same time a confirmation of it. It is part of the daily experience of the spiritual battle.
In the Summa Theologica, Thomas Aquinas discusses this distinction when he asks "Whether the fruits of the Holy Ghost are contrary to the works of the flesh?" In his discussion of an answer, he remarks:
Because the Holy Ghost moves the human mind to that which is in accord with reason, or rather to that which surpasses reason: whereas the fleshly, viz. the sensitive, appetite draws man to sensible goods which are beneath him. Wherefore, since upward and downward are contrary movements in the physical order, so in human actions the works of the flesh are contrary to the fruits of the Spirit.
The "spirit" of man, in this conception, is the part of a human which allows itself to be guided by reason—which Aquinas takes to be the defining characteristic of humans. The "flesh" is the part which we share in common with other animals, the "sensitive appetite" or the part of us which considers as its primary good the good of our senses. As can be seen from the last sentence of the quote, Aquinas does consider these two opposed, as we see in Romans 8:5 or Galatians 6:8 which you cite.