Delete parts of a grid outside of another object
The problem is, that you need a proper (non-manifold) mesh to do the Boolean operations with. The method you used to create your "Grid Cube" doesn't help here because it doesn't prouce one. You could check your mesh in Edit Mode hitting Ctrl Shift Alt M with the Mesh Select Mode set to Edge or Vertex.

Here's a better Method to create your Grid-Frame-Cube:


Create a small cube in the corner


Add a default Cube (2x2x2) in the Center and name it miniCube
Position your 3D Cursor to the front bottom left corner by selecting the Vertex in Edit Mode and use Shift S, Cursor to selected
Pivot around the 3D Cursor and scale your Cube (S) by 0.25.

Duplicate this small cube twice, name one Grid and one inner, then hide the original miniCube or move it to another Layer as a Backup. You might need it later again to play around with the following Bevel settings.
Select the inner Cube and in Edit Mode select every Vertex (A), then use an Edge Bevel (Ctrl B) of 0.25.
Select the Grid Cube and add a Boolean Modifier with the inner Cube as Object in Difference mode. (This will cut out the inner part, basically only leaving the grid-frame)
Add three Array Modifiers, one for each Axis to the Grid Cube. This basically creates the grid-frame-like Cube structure you created but with a proper geometry.


Set the Count to 4
Set the Relative Offset to 0.0 on each but 1.0 for one axis: x for the first Modifier, y for the second and z for the third.
Check Merge



Now you can add the Boolean Modifier to the 2x2x2 Sphere in your Center with an Intersect Operation and the Grid as its Object and it will work fine:



You could of course play with the Bevel of your small cube before to get your grid nicer looking. You could use more Segments or change the Profile from 0.5 which is "flat" to a smaller number like 0.25 to get a more rounded grid-frame. Its settings are available in the panel in the Toolbar once you confirm the Bevel before doing any other operation or by hitting F6.