How can I repair a loose T joint connecting pipes under my kitchen sink?
Those are simple "slip-joint" connections. 

Judging from the angle of the lower pipe assembly (the tee, and trap parts) it appears that you may have a loose connection downstream at the wall as well, or it would not have swiveled down and away like the picture shows.

You can fix this yourself. Unscrew the nut at the top of the tee, there will be a plastic or rubber slip-joint washer under the nut. Slide the nut way up onto the black disposer elbow, followed by the washer. Carefully swivel the tee up until the disposer elbow is well inside the top of the tee, then slide the nut and washer down until you can thread the nut into place.

Contrary to some people's opinion, these are not "hand tight" connections. Tighten all the slip-joint nuts under that sink with a wrench (I use Channel-Locks). Do not "pinch" the nuts when tightening or you could break or crush them. Do not overtighten them by impersonating Arnold Swartzenegger either. Check for leaks, sometimes the washers need to be replaced if they are damaged or stiff. 

Now get some ice for where you bumped your head and have your partner rub your sore back while you have a well deserved beer.