Pope Pius XII canonising St Maria Goretti
It is a theologically certain doctrine that the canonisation of a saint is an infallible act of the Church's magisterium. I thought it might be useful to set down here some of the arguments that have been used by theologians. Just to be clear: the question is whether the doctrine:
"That the canonisation of a saint is an infallible act of the Church's magisterium."is itself theologically certain.
In his Quodlibets, St Thomas considered the question. Having affirmed that it was impossible for the Church to err in matters of faith, he went on to say:
“Because the honour which we show to the saints is a certain profession of faith by which we believe in the glory of the saints, it should be devoutly believed that not even in these matters can the judgement of the Church err.”(This is usually quoted in older books as Quodlibet 9.16 At the Corpus Thomisticum, you can find it at  Quodlibet IX, q.8 corpus.)
Then a couple of references from the Jesuit Sacrae Theologiae Summa Vol 1 p.742 (My translations - and I am not able to double-check the references given):
Suarez said of the infallibility of canonisation:
"Although it is not de fide, I judge that it is sufficiently certain and that the contrary is impious and temerarious." (De Fide d.5 s.8 n.8)Benedict XIV noted that some older theologians denied the infallibility of decrees of canonisation but said that this divergence only proved that, on this point as with others, discussion was possible before the Catholic view was definitively fixed in the Schools. Defending this teaching, he said of the opinion which denied the infallibility of canonisation:
“If it is not heretical, it is nevertheless temerarious, bringing scandal to the whole Church ... savouring of heresy ... We say that he is the upholder of an erroneous proposition who dares to assert that the Pontiff in this or that Canonisation has erred, that this or that Saint canonised by him should not be honoured with the cult of dulia.” (De Canonisatione Sanctorum L.1 c.43 n.3)(The cult or veneration of dulia is a traditional way of referring to the veneration due to the saints as opposed to the cult of latria, or simply adoration, which is due to God alone and may not be given to any created thing or person.)
We can understand why canonisation must be infallible if we consider the difference between beatification and canonisation. Beatification is the permission of veneration locally or for particular groups. Such veneration is not commanded but tolerated and permitted.
In the case of canonisation, the Church not only tolerates and permits the veneration of a person but commends and prescribes such veneration to the whole Church. In the Church’s mission of leading the faithful to salvation, it is necessary that the formal and solemn presentation of a person by the supreme Pontiff as one who is to be imitated and venerated perpetually, should be part of the infallible magisterium of the Church.
Theologians further discuss whether the infallibility extends to the judgement that the saint had heroic virtues or simply to the judgement that the saint is in fact in heaven. The latter is more probable since the good of the Church does not require that every aspect of the canonisation process is flawless, only that Christ preserves the Church from requiring universal veneration of someone who is not in heaven.
So although we all want to give the Pope the benefit of our wisdom on how the canonisation process might be improved (and I don't claim that everything in the garden is rosy) we are nevertheless bound to believe that the saints that he does canonise are in heaven and worthy of our veneration.