"Ashes to ashes. Dust to dust"
Page from 'The Book of Common Prayer' (1762)
Public DomainPage from 'The Book of Common Prayer' (1762) - Credit: John Baskerville

These words appear in the Funeral Service of the Book of Common Prayer. They are part of the section read by the priest at the graveside, when earth is being cast onto the coffin. In the 1662 version (which is still the official Prayer Book of the Church of England), the relevant section is as follows:

Forasmuch as it hath pleased Almighty God of his great mercy to take unto himself the soul of our dear brother/sister departed, we therefore commit his/her body to the ground: earth to earth, ashes to ashes, dust to dust; in sure and certain hope of the resurrection to eternal life through our Lord Jesus Christ; who shall change our vile body, that it may be like unto his glorious body, according to the mighty working, whereby he is able to subdue all things to himself.

The highlighted phrase is based on a Biblical text (Genesis 3:19) which in the King James Version of the Bible reads as follows:

In the sweat of thy face shalt thou eat bread, till thou return unto the ground; for out of it wast thou taken: for dust thou art, and unto dust shalt thou return.