I had that issue til i realized I didn't have the focus point set right. It was focusing on something TOTALLY different than what I was aiming at. Check out this video: Photo Tips #003 - Use your Center Focus Point
I had this isssue where the T5i would turn on but then would go off by itself. It seemed like when I removed the battery and put it back in (I have an addon battery grip) it seemed to fix it . But it did it constantly. BUT, I also had a EZ Share Wifi...