Gmina Walim is a rural gmina (administrative district) in Wałbrzych County, Lower Silesian Voivodeship, in south-western Poland. Its seat is the village of Walim, which lies approximately 15 kilometres (9 mi) south-east of Wałbrzych, and 64 kilometres (40 mi) south-west of the regional capital Wrocław.
The gmina covers an area of 78.75 square kilometres (30.4 sq mi), and as of 2019 its total population is 5,416.