The medication container includes a receptacle and a cap. The cap includes a gate that can be selectively opened to enable access to medications in the receptacle and closed to restrict access to medications in the receptacle. The gate has a locking mechanism that only unlocks to allow the gate to open from the closed position in response to an application of a downward force on a portion of the gate to resiliently deflect a portion of the gate. The cap further includes electronic components that are configured to monitor movement of medications through the cap and into and out of the receptacle, the electronic components including a memory that is configured to store data pertaining to such passages of medications.