As you found out, the right amount of moisture is important. Don’t let yours dry out. Keep the soil moist but be certain it isn’t standing in water. I wonder if the night time temperature is too high. Gardenias do best when the overnight temperature is 50-55 F. Too warm, and they buds will drop off. Hopefully, these suggestions will help your gardenia flower.
Thanks for writing!