Electronic controlled trash can lid eats batteries
Paralleling a power supply and batteries is not recommended without some sort of circuit to make sure they don' keep being charged uncontrollably.
 First you need to tell us what type of batteries and the exact voltage on your power supply (is it regulated or unregulated). Then you can get a more accurate answer.
 However, I will try to help.
The simplest thing you can do is place a diode (Shottky preferred) going from the battery pack towards the trash can. Depending on the type of power supply, you will probably need another diode from the supply to the trash can. The first one will prevent uncontrolled charging of batteries, while the second one will prevent the slow discharge of the batteries through the power supply. Then you need a resistor across the first diode to enable a trickle charge (in case you're using NiMH cells, the trickle charge current must be 0.05C or no more than 1/20 of the capacity rating).
 The value of the resistor depends on the exact voltage of your power supply, but my rough estimate would be around 47-100 ohms.