You use if the worst comes to the worst to say what you might do if a situation develops in the most unfavourable way possible. The form if worst comes to worst is also used, mainly in American English.
If the worst comes to the worst I guess I can always ring Jean.
He was asked whether he would walk out if the worst came to the worst.