Suppose you copied a layer to a canvas which has a bigger size than the copied layer, it will looks like this
If you press Ctrl + A, you select the whole canvas, what if you want to only select the layer with the gradient effects? You want to select the layer and crop it to make the canvas fit the layer.
You can't use the Magic Wand Tool neither, because the layer is a fill layer.
Here is a Photoshop tip to do this. Move your cursor to the thumbnail of the layer and hold your CTRL key, the cursor will becomes a hand with a selection icon like below
Now click the thumbnail, the layer will be selected
Now select menu: Image -> Crop, you have your canvas the same size with the fill layer.