Gmina Olszanica is a rural gmina (administrative district) in Lesko County, Subcarpathian Voivodeship, in south-eastern Poland. Its seat is the village of Olszanica, which lies approximately 9 kilometres (6 mi) east of Lesko and 71 km (44 mi) south-east of the regional capital Rzeszów.
The gmina covers an area of 94.02 square kilometres (36.3 sq mi), and as of 2006 its total population is 5,059.