Prove by induction.
Hint: The 1<th to (1<<(k+1))-1th values are twice the 1<<(k-1)th to (1<th values, plus either zero or one.
Edit: That was way too confusing. What I really mean is,
gray(2*n) and gray(2*n+1) are 2*gray(n) and 2*gray(n)+1 in some order.