"Errare humanum est", to err is human. Wise words sometimes attributed to Seneca the Younger, a Roman stoic philosopher. What's often left out is the follow up: "erseverare autem diabolicum", to persist is of the devil. Here persist meaning repeating those same mistakes.
It's ok to make mistakes. But those should be opportunities to learn, not something that should be repeated. And that, I think is the core of this whole phrase. Just making mistakes doesn't make us human, it's our ability to learn from them.
Another form of the phrase is from Cicero: "is Cuiusvis errare: insipientis nullius nisi, in errore perseverare" (Anyone can err, but only the fool persists in his fault). Makes it even more clear of the meaning without resorting to any supernatural beings yet still retaining the idea.
Of course church had it's influence, somehow missing the point about learning and instead emphasizing forgiveness being a divine quality with the form "To err is human, to forgive divine". Maybe they missed the third and final part of the Seneca's text: "et tertia non datur", and the third possibility is not given.
From modern pop culture we can find probably the most refined version of this: Do or do not. There is no try. One should not fear of failing and mistakes. Trying to do something without believing to be able to do it. You might fail, but you shouldn't aim for it.