How to make a relay ON for few seconds after power goes OFF?
Providing the circuit that drives the relay electrically disconnects itself when power is removed (i.e. the power gets switched on then the power is removed by a switch), think about using an electrolytic capacitor to sustain the coil current for a few seconds.

A 12 volt relay might have a coil resistance of 1000 ohms and the relay might drop-out when the coil voltage reaches (say) 6 volts. This means the voltage shouldn't fall by more than 6 volts in ten seconds.

That's a \$\dfrac{dv}{dt}\$ of 0.6. 

If the current needed to sustain the relay is 6 volts/1000 ohm that is 6 mA hence: -

6 mA = C dV/dt or, C = 10,000 uF.