As you suggest, the binary representation works because the binary numbers with $d$ digits can be thought of as vectors representing the coordinates of the vertices of the $d$-dimensional hypercube. Now notice that the coordinates of an edge midpoint can be obtained by averaging the coordinates of two (adjacent) vertices and the coordinates of a face midpoint can be obtained by averaging the coordinates of two edge midpoints.
This suggests using a ternary (base 3) system, with each digit equal to 0, 1, or 2. Consider a hypercube whose volume is the tensor product of the intervals $[0,2]$. Then the coordinates of the vertices are all the $d$-digit ternary numbers with each digit equal to 0 or 2. The edge midpoint coordinates are all the $d$-digit ternary numbers with one digit equal to 1 and the remaining digits equal to 0 or 2. The face midpoint coordinates are all the $d$-digit ternary numbers with two digits equal to to 1 and the remaining digits equal to 0 or 2. This extends in the obvious way to higher-dimensional analogues of faces.
So for instance, the vertices of a cube ($d=3$) are
(0,0,0)
(0,0,2)
(0,2,0)
(2,0,0)
(0,2,2)
(2,0,2)
(2,2,0)
(2,2,2)
The edges are
(0,0,1)
(2,0,1)
(0,2,1)
(2,2,1)
(0,1,0)
(2,1,0)
(0,1,2)
(2,1,2)
(1,0,0)
(1,0,2)
(1,2,2)
(1,2,0)
and the faces are
(1,1,0)
(1,1,2)
(1,0,1)
(1,2,1)
(0,1,1)
(2,1,1)
Thinking about these coordinates even gives a simple way even to determine the number of $n$-faces of a $d$-dimensional hypercube. These correspond to all $d$-digit ternary numbers with $n$ digits equal to 1 and the remaining digits equal to 0 or 2, so there are $2^{d-n}\cdot {d\choose{n}}$ of them.
Two things I haven't addressed are:
Ordering; the Gray code's ingenuity is that adjacent vertices in the list are adjacent in space. I think you could achieve this with the representation I've described using an approach similar to Gray's, but the question doesn't specifically mention ordering so I didn't worry about it.
How to code this up. This is more of a programming question, and shouldn't be too difficult.