The Terratin Incident

While observing a burnt-out supernova, the Enterprise picks up a strange message transmitted in a 200 year old code. The signal is traced to a nearby planet, and when the ship arrives it is hit by an energy beam that damages it's dilithium crystals, and makes the crew begin to shrink. Dr. McCoy discovers that the crew will continue to shrink beyond their ability to control the ship unless a cure is found.