The essential equation to understand this matchup is:
Canon T4i - grip problem + lens upgrade = Canon T5i
Read on for more:
A little while after release of the Canon T4i, reports emerged that some grips turned white and could cause mild allergic reactions. Canon traced the problem to a type of zinc present in the rubber of some grips. Rather than fix the issue with the T4i and keep the model name, Canon distanced itself from the T4i by replacing it with a new but nearly identical model, the T5i.
If you find a T4i on fire sale and don't mind the potential grip issue (it only affected some T4i cameras), it might be a viable choice. There really are precious few improvements in the T5i over the T4i and bargains are always nice.
The chief benefit to the T5i is the new 18-55mm STM kit lens, with an advanced stepping motor that significantly improves autofocus speed. Other than that, you'd be hard pressed to spot a difference beyond minor features like support for real-time display of creative filter effects in live-view mode.
Let's be honest though: the decision is pretty easy: buy the T5i. The cameras are nearly identical, but the T5i gives you an AF boost thanks to the kit lens and peace of mind that you won't end up with the white-grip-of-allergic-reaction.