maybe this is what you are looking for. Gathering from your description you need a clipping mask try this tutorial but there are several ways to do things in PS.
I also put this together for you.
Create separate layers for your line, pattern, and gradient.

Right click on the "Gradient" layer and select blending options. Since I want my gradient to fade from black to the pattern I've selected "multiply" for the Blend Mode. (You can also change the blend mode located at the top of the layers panel.) You may also select overlay, it all depends on the desired effect you need from the gradient.

Next highlight the pattern and gradient. (ctrl click pc or cmd click mac) Then right click on one of the layers and select "Create Clipping Mask" Just make sure that these two layers are on top of the line layer.
