Not sure about this one, but after building a festival, I get the +5 loyalty for only a turn, and I can build the festival again, and my loyalty no longer has the +5.
When you complete the Festival you get a +5 increase to the loyalty in the settlement. But, depending on the situation in the settlement, your loyalty will increase or decrease each following turn.
For example, if you capture an enemy Capital the loyalty will be decreased to 1. A very unhappy population. Say that the change each turn is -1 (poor food situation). When you build the festival the loyalty will increase to 6 (1+5). The turn after it will decrease to 5 (6-1) and so on and so forth. This means that you might come in a situation where you need to build festivals for a longer period of time until you, for example, solve the overpopulation by also building settlers.