The heist was part of a Hamas police operation targeting contraband drugs, including cocaine and hashish, but also alcohol, which is banned by the Islamist group.
The painkiller, Tramadol, is a controlled substance in the Gaza Strip and can only be obtained with a prescription.
Police showed off the booty at a news conference on Tuesday, estimating the drugs' street value at $6 million.
After the news conference, police dumped the pills in a hospital incinerator, and emptied out bottles of alcohol in the hospital garden.