In general, doctrine is all Church teaching in matters of faith and morals. Dogma is more narrowly defined as that part of doctrine which has been divinely revealed and which the Church has formally defined and declared to be believed as revealed.
The Catechism of the Catholic Church explains,
The Church’s magisterium exercises the authority it holds from Christ to the fullest extent when it defines dogmas, that is, when it proposes, in a form obliging the Christian people to an irrevocable adherence of faith, truths contained in divine Revelation or also when it proposes, in a definitive way, truths having a necessary connection with these. (CCC 88)
Concerning the Church’s teaching that Mary is the Mediatrix of All Graces, while this doctrine has been divinely revealed, it has not yet been—although could be—elevated to dogma. In Fundamentals of Catholic Dogma, Dr. Ludwig Ott explains, "The doctrine of Mary’s Universal Mediation of Grace based on her co-operation in the Incarnation is so definitely manifest in the sources of the faith, that nothing stands in the way of a dogmatic definition" (215).