If the mountain will not come to Muhammad...
If one's will does not prevail, one must submit to an alternative.
The full phrase 'If the mountain will not come to Muhammad, then Muhammad must go to the mountain' arises from the story of Muhammad, as retold by Francis Bacon, in Essays, 1625:
Mahomet cald the Hill to come to him. And when the Hill stood still, he was neuer a whit abashed, but said; If the Hill will not come to Mahomet, Mahomet wil go to the hil.
Present uses of the phrase usually use the word 'mountain' rather than 'hill' and this version appeared soon after Bacon's Essays, in a work by John Owen, 1643:
If the mountaine will not come to Mahomet, Mahomet will goe to the mountaine.
The early citations use various forms of the spelling of the name of the founder of the Islamic religion - Muhammad, Mahomet, Mohammed, Muhammed etc.
See also: the last words of Sir Francis Bacon.