Can I connect my Canon Rebel T3i to laptop to keep the battery charged while making a timelapse?
Plugging your Canon T3i/600D into a laptop or other computer via USB cable will not charge the battery. The batteries for your camera can only be recharged by using a proper battery charger and the camera does not have one built in.
You can use an external power supply to power the camera without plugging it into the laptop. There are many others besides the AC model linked above available that is compatible with your camera. Any that are Canon LP-E8 compatible should work in your T3i.
AFAIK you could use an external DC power supply – so your camera could operate without any battery virtually over days or even weeks. And then you can of course also connect the camera to your laptop through USB to download the images and/or trigger the time lapse or the like.
Here's video with detauls on how to use the DC power supply at youtube: "How to use your Canon 550D/600D without batteries!"