How to operate a solenoid
You need to look more closely at your solenoid description. At 12 volts it will pull 8 amps! As it says, it is best used for impact applications, and they do not recommend using it for more than 2 seconds at a time, or it will get hot. And they're not kidding. 12 volts times 8 amps is 96 watts, so that is how much power it will dissipate, and that's how much power you must provide.

You don't say what kind of 12 volt battery you're using, but unless it's a car battery, it probably is not able to provide the current you need. Likewise, your power supply has no current rating, but its regulator is an LM317, and is not able to do better than about 1 amp.

So what you need is a much beefier power supply, or a much bigger battery.

Either way, don't apply power for more than about 2 seconds out of every 10 to 15 seconds, or you'll eventually damage the solenoid.