It is very probable that Cantor knew the work of du Bois-Reymond.
1) Meschkowski and Nilson write in Georg Cantor - Briefe, p. 78 (my translation): "With respect to the intensity with which Cantor used to study the papers of others, it is hardly possible that he did not notice this example." (Here they refer to the "Cantor set" which had been described by du Bois-Reymond earlier.)
2) Meschkowski and Nilson write in Georg Cantor - Briefe, p. 37 that du Bois-Reymond has used the diagonal procedure 15 years before Cantor. With respect to their remark in (1) it is very probable that Cantor learnt this argument from du Bois-Reymond.
3) This suspicion is supported by other plagiarisms of Cantor. For instance Dedekind proved that the algebraic numbers are countable and wrote it in a private letter to Cantor. Cantor used his argument and published this proof without giving credit to Dedekind. Dedekind himself has made a note of this case where he mentiones this incident including the fact that Cantor used the technical term "Höhe" which Dedekind had invented just for the use in his proof and had wrote it to Cantor. This note is published in E. Noether, J. Cavaillès: Briefwechsel Cantor-Dedekind, Hermann, Paris (1937), p. 18:
"Hierauf habe ich umgehend geantwortet, dass ich die erste Frage nicht entscheiden könnte, zugleich aber den Satz ausgesprochen und vollständig bewiesen, dass sogar der Inbegriff aller algebraischen Zahlen sich dem Inbegriffe (n) der natürlichen Zahlen in der angegebenen Weise zuordnen lässt (dieser Satz und Beweis ist bald darauf fast wörtlich, selbst mit dem Gebrauch des Kunstausdruckes Höhe, in die Abhandlung von Cantor in Crelle Bd. 77 übergegangen, nur mit der gegen meinen Rath festgehaltenen Abweichung, dass nur der Inbegriff aller reellen algebraischen Zahlen betrachtet wird)."
Italics are mine.