1. Put your hands together.

2. Put together your hands.

3. Take your hands apart.
4. Take apart your hands.
--------------------
Are they all grammatical? Is #3 the opposite of #1?

All are grammatical. We would use #1 and #3 in preference to #2 and #4. #4 could be interpreted as taking your hands apart, finger by finger or bone by bone, and laying them aside, as in amputation. "Put your hands together" is usually an exhortation or command to applaud, in casual speech or slang, although it literally could mean clasping one's hands together. "Put together your hands" could mean assembling them from a kit, which is ridiculous. :)