The Role of Gas in Star Cluster Formation