The most obvious solution to this is a microcontroller. Writing the program you describe: waiting for a switch, then turning things on and off after fixed delays, is a trivial task for any microcontroller.
Common microcontrollers for hobbyists are the Microchip PIC and the Atmel AVR. These are available in small quantities at reasonable price from most electronics distributors that will sell to the public and the development tools are free or cheap. There are also small, inexpensive computers or microcontroller based platforms sometimes used for these purposes. Examples: Raspberry Pi, Gumstix, and Arduino.
While one could conceive of implementing the same functionality without a microcontroller, it would probably be harder to implement. Research the multivibrator class of circuits to create the delays, and digital logic to implement the logic deciding what to do after each delay, when to begin, etc.
Neither a microcontroller nor common digital logic will be able to drive your solenoid directly, so you will need to employ a transistor to have enough current available to run the solenoid. Also keep in mind common pitfalls when a high-current or inductive load is added to a digital circuit.