The rarest substance is the universe is probably the quark-gluon plasma or something like it. This is a phase of matter generated only under the most intense temperatures and pressures. For most of the first millionth of a second after the Big Bang, the explosive event that created our universe, all matter was in the form of a quark-gluon plasma. Quarks and gluons are particles that make up nucleons like neutrons and protons, which in turn make up the atoms that constitute all matter. Quarks are the particles with mass, while gluons are the force-mediating particles that "glue" the quarks together.
Though the quark-gluon plasma is currently a contender for the rarest substance in the universe, at its start, it was the normal state of matter. A quark-gluon plasma is a bath of almost-free quarks and gluons, which typically are tightly locked into nucleons. Conventional nucleons are so tightly held together that even a nuclear explosion or the temperature and pressure at the core of the Sun is not enough to shake them apart. Free quarks have never been observed, and some physicists think the very phenomenon of free quarks is physically impossible.
Quark-gluon plasma is created in some unusual circumstances outside of the Big Bang. We've been able to produce it at will in particle accelerators, using huge amounts of energy focused on heavy ions, since the year 2000. It took about two decades of trying to create it, the rarest substance we know of. The feat was accomplished at the CERN particle accelerator in Switzerland. More recently, CERN's Large Hadron Collider is conducting experiments on the quark-gluon plasma.
The quark-gluon plasma may not actually be the rarest substance if it turns out to exist in the centers of extremely massive stars. Some neutron stars (the remnant left by some of the largest supernovas) are more dense than would be predicted by theory, causing some scientists to suspect that these are not actually neutron stars, but actually quark stars. Neutron stars have a radius between 10 and 20 km (6 - 12 mi), but a mass slightly larger than that of the Sun. In contrast, quark stars, if they exist, would have a radius between 3 and 9 km (2-6 mi) and a mass comparable to neutron stars, making them the most dense objects in the universe. The supernova remnant RX J1856.5-3754, the neutron star closest to Earth, is one potential candidate for being a quark star.
There are other substances that contend for the title of rarest substance in the universe. These include the exotic particles created under very high energy cosmic ray collisions, and other exotic particles that existed at the dawn of the universe but have never been seen since. Antimatter does not qualify as the rarest substance in the universe because it can still be found floating in space practically everywhere, albeit in very low proportions.