Both are possible, but in modern English, if you are starting a sentence with the verb as a subject, it is normal to use the gerund. For example ,'Seeing is believing', 'Taking part is more important than winning' 'Breaking up is hard to do' and so on.
It is possible to use 'To + infinitive' at the beginning of a sentence, but it can sound old-fashioned and stilted - like you're quoting from Shakespeare or the Bible. 'To err is human, to forgive is divine', and suchlike.
Unless you are deliberately trying to be poetic, it's best to use the gerund at the beginning of a sentence.
Later on in the sentence, you can use either, whichever sounds better.
Believing is the most important thing.
The most important thing is believing.
The most important thing is to believe.
I hope that answers your question.