Most gardenias bloom just once per year. If yours is one of these, prune it just after it finishes its bloom cycle. Avoid pruning late in summer or fall because that will remove blooms for next year.
They generally need only minimal shaping. The less you remove, the stronger the bloom next year. However, if the shrub must be cut back severely, it will resprout OK. You'll just get less bloom next year with a severe cutback.