In a number of cases, ce is used as subject of être, preceded by a comma and with the pronominal function of repeating the real subject of the sentence (in these uses it has no English equivalent). Among these cases belongs your case which is that of a real subject being an infinitive. Ce is obligatory here if the complement is also a positive infinitive (as in your example), but is optional otherwise.
Here is another example:
Vouloir, c’est pouvoir. When there is a will there is a way.
Reference: H. Ferrar, A French Reference Grammar, 1988, OUP.
B. Quand c’est un nom, l’infinitif s’utilise souvent pour exprimer des
maximes, des vérités générales, des proverbes.
Promettre est facile, tenir est difficile.
Donner c’est donner, reprendre c’est voler.