Knives are a blessing and a curse, because they can either be used as a tool or a weapon.
The expression comes from the Geneva translation of the Bible (1561), Deuteronomy 11:26-28:
26 ¶ Beholde, I set before you this day a bles∣sing and a curse:
27 * The blessing, if ye obey the commande∣ments* of the Lord your God which I com¦mande you this day:
28 And the curse, if ye wil not obey the com¦mandements of the Lord your God, but turne out of the way, which I cōmande you this day, to go after other gods, which ye haue not knowen.
The phrasing made it into the King James Version virtually unchanged, and the expression then took on a life of it own (see the Wiktionary entry). While its uses are sometimes religious, it's not hard to find secular uses that have the gist you mean, namely that the knife could be helpful or harmful: