You can set layer visibility (in the layer symbology) based on an atlas variable. Your options for atlas variables are: @atlas_feature, @atlas_featureid, @atlas_geometry and @atlas_pagename.
In QGIS 3.0, use the atlas variable to control whether the layer is enabled.
For example, if your atlas pages are named Map A, Map B and Map C, set the visibility of the grid for Map A like so:
In QGIS 2.18 and earlier, "Enable layer" is not an option. Instead, use a similar method to control the layer transparency. Use this expression for data-defined transparency for Map A:
if(@atlas_pagename = 'Map A', 0, 100)
You can also write your own expressions to control layer visibility within the print composer.
Write an expression that outputs a list of map layer names separated by the | character. For example:
when @atlas_pagename = 'Map A' then 'layerone | layertwo | layerthree'
when @atlas_pagename = 'Map B' then 'layerone | layertwo | layerfour'
when @atlas_pagename = 'Map C' then 'layerone | layertwo | layerfive'
This is how I knew how to format the list of map layer names.