Sorry, but the timing is really funny.
Losing your religion empire wide can happen. One thing to keep in mind though: Any GPr you generate will be of your religion. Even if the city where the GPr spawns is following a foreign religion. In the Renaissance and earlier eras, while GPr spawns are subject to RNG, you will be okay. After the Industrial Era, you cannot faith purchase GPr except in cities following your faith, so that can be a very difficult situation.
Your Holy City can still build Grand Temple even when it is not following your religion. Once you get that, you can depend on it re-converting. But that might not last, so you want to have faith on hand to buy a GPr as soon as you can.
Filling out Piety also gets you a GPr in your cap. If you have faith stored up, immediately buy a second GPr and over the next four turns, convert the seven cities closest to your cap. You will have no more problems!