Erlinsbach is a municipality in the district Gösgen in the canton of Solothurn in Switzerland. It was created on 1 January 2006 by the former municipalities of Niedererlinsbach and Obererlinsbach became the municipality of Erlinsbach.