This upside-down rainbow is technically known as a circumzenithal arc.

Rainbows are formed by the refraction of the visible spectrum through drops of water. These arcs, on the other hand, form when light hits the top of ice crystals--like those contained in some kinds of clouds--and is then refracted out through the side of the crystals.