The following circuit is a simple timer circuit for operating a 12V relay. With the parts specified it will have an on time duration of 0 to about 60 seconds. Using a different capacitor for C1 will change the maximum on time. The timer can be triggered by a simple switch across the trigger points or connect an NPN transistor to the trigger points to allow a motion detector or logic voltage or another circuit to trigger the timer (see Fig.1 for an example of a motion detector trigger).
Actually, I think this is a monostable circuit. There might be a problem with using a 470uF cap at C1 - it may not allow the 555 to reset, especially with pin 4 connected to Vcc. I'd change that cap to a 220uF and up the value of VR1. Also, pin 5 needs to have a 0.1uF cap connected to ground.
The solenoid would be connected to the Normally Open and Common pins of the relay. The power supply for the solenoid is wired in series with the solenoid. I think I have a wiring diagram for this type of application on my machine at work. Drop me a PM with your email and I'll send it to you.