It means to treat someone as they have treated others.
For instance, when a schoolyard bully gets beaten up by an even bigger bully, then he is "getting a taste of his own medicine".
Medicine often tastes horrible, and is often sold by pharmacists (chemists, in the U.K.). Thus, when a pharmacist is prescribed a product he sells, then he is finally getting a taste of his own medicine.
_________________
The mere fact that science may not yet adequately explain an object, event, or experience does not mean the immediate explanation should automatically default to a conspiratorial, extraterrestrial, paranormal, or supernatural cause.