The phrase “ashes to ashes, dust to dust” comes from the funeral service in the Book of Common Prayer, and it is based on Genesis 3:19. That passage says that we begin and end as dust. Where did the ashes come from? The compilers of the Book of Common Prayer were careful to produce what is called metrical text—text that when a congregation reads it, it all comes out even. So they pulled in Genesis 18:27 and Job 30:19, in which dust and ashes are both components of the human body.
“Ashes to ashes, dust to dust” is poetic. That exact phrase is not in the Bible, but it is Biblical through and through.
Each church of the Anglican Communion has its own version of the Book of Common Prayer. In the current American version, this phrase appears on page 485 (Burial Rite 1) and on page 501 (Burial Rite 2) in a prayer that is said by the priest as earth is ceremonially cast on the coffin:
The funeral service is poignantly meaningful and a literary masterpiece that has rightly become part of the literary treasure of the English language. You’d be surprised how many pastors whose churches have no formal liturgy use the Book of Common Prayer as a worship resource. From http://www.kencollins.com/answers/question-27.htm