As /u/CommodoreCoCo stated, the phrase itself does originate from the Bible, gaining prominence in American culture in the early 20th century as further means to spread the concept of combining physical health with christianty. They re depicted Biblical characters as men of strength, glorified the body as a temple of strength and virtue and in some ways vilified the weak.
I give a more full answer to it here
It may be an adaptation of an earlier Mediterranean/Levantine adage, but the Bible's 1 Corinthians 6:19 reads:
Or do you not know that your body is a temple of the Holy Spirit within you, whom you have from God? You are not your own... (ESV)