I don’t know the context in which the priest spoke because I haven’t read his homily; but I assume he meant that not sanctifying Sunday could constitute grave matter, which in turn could become mortal sin if the other conditions of full knowledge and full, free consent of the will are also present. In any case, from your account it does not appear that you need to avoid Mass until confession because you have shopped on Sundays. Even if it rose to the level of grave matter, the other two conditions are required to constitute mortal sin.
It is important to make two distinctions about Sunday:
[list]Rest does not mean inactivity. American Protestants from the colonial period to the mid-twentieth-century thought that to rest from work meant to cease all activity. The Sunday “blue laws” that prohibited businesses from opening on Sundays were a result of this approach to Sunday rest. John Paul II notes in Dies Domini (4) that economic changes in many countries have changed the nature of Sunday from a holy day to part of a weekend.[/list]
[list]The main way that Catholics sanctify Sunday is by attending Mass (CCC 2177).[/list]
This doesn’t mean that Catholics should not try to set aside unnecessary work on Sundays (Therese of Lisieux’s father closed his jewelry shop on Sundays) and that all a Catholic should do is go to Mass and then the rest of the day is his to do as he likes (an attitude that treats Sunday as simply part of “the weekend” was criticized by John Paul II in Dies Domini). What it does mean is that Catholics should use reasonable care to devote Sundays to worship, family, and spiritual rest, while being careful to avoid legalistic attitudes that would condemn innocent pleasures such as window-shopping that may well provide a means of interacting in a Christian manner with family and society as a whole.
Here is the balance that the Catechism of the Catholic Church recommends:
On Sundays and other holy days of obligation, the faithful are to refrain from engaging in work or activities that hinder the worship owed to God, the joy proper to the Lord’s Day, the performance of the works of mercy, and the appropriate relaxation of mind and body. Family needs or important social service can legitimately excuse from the obligation of Sunday rest. The faithful should see to it that legitimate excuses do not lead to habits prejudicial to religion, family life, and health.
The charity of truth seeks holy leisure – the necessity of charity accepts just work (CCC 2185).
Those Christians who have leisure [on Sundays and holy days] should be mindful of their brethren who have the same needs and the same rights, yet cannot rest from work because of poverty and misery. Sunday is traditionally consecrated by Christian piety to good works and humble service of the sick, the infirm, and the elderly. Christians will also sanctify Sunday by devoting time and care to their families and relatives, often difficult to do on other days of the week. Sunday is a time for reflection, silence, cultivation of the mind, and meditation which furthers the growth of the Christian interior life (CCC 2186).
Housework on Sundays** by Jimmy Akin