Collective Ion Acceleration Controlled by a Gas Gradient