Dark matter in the Milky Way II. The HI gas distribution as a tracer of the gravitational potential