Gamma-rays from atomic and molecular gas in the first galactic quadrant