What’s posted above is pretty much right. I’m not sure it does enough to just point to scriptural passages about “keeping holy the Sabbath,” as perhaps someone might have different ideas as to how to keep the day holy. This is not an issue on which people can say, “Well, I’m keeping the day holy in my own way, so that’s all the Bible requires.” The Church specifies how we must keep it holy: by going to Mass.
The Catechism reference given above is close to being the right answer, except that the Catechism just compiles and explains the teachings and norms of the Church, it does not create them. Rather, the obligation comes from the Code of Canon Law, specifically canons 1246-48:
Feast Days
Can. 1246 §1. Sunday, on which by apostolic tradition the paschal mystery is celebrated, must be observed in the universal Church as the primordial holy day of obligation. The following days must also be observed: the Nativity of our Lord Jesus Christ, the Epiphany, the Ascension, the Body and Blood of Christ, Holy Mary the Mother of God, her Immaculate Conception, her Assumption, Saint Joseph, Saint Peter and Saint Paul the Apostles, and All Saints.
§2. With the prior approval of the Apostolic See, however, the conference of bishops can suppress some of the holy days of obligation or transfer them to a Sunday.
Can. 1247 On Sundays and other holy days of obligation, the faithful are obliged to participate in the Mass.
Moreover, they are to abstain from those works and affairs which hinder the worship to be rendered to God, the joy proper to the Lord’s day, or the suitable relaxation of mind and body.
Can. 1248 §1. A person who assists at a Mass celebrated anywhere in a Catholic rite either on the feast day itself or in the evening of the preceding day satisfies the obligation of participating in the Mass.
§2. If participation in the eucharistic celebration becomes impossible because of the absence of a sacred minister or for another grave cause, it is strongly recommended that the faithful take part in a liturgy of the word if such a liturgy is celebrated in a parish church or other sacred place according to the prescripts of the diocesan bishop or that they devote themselves to prayer for a suitable time alone, as a family, or, as the occasion permits, in groups of families.