Step 1: Sign into your gandi.net account
Step 2: Select your domain (click on the Manage tab if you don't see a similar screen after logging in)
Step 3: At the bottom of the screen (under Technical Settings), click "Manage DNS zone file"
Remove the unneeded entries as indicated in the screenshot (i.e. everything except the "A" record and the www CNAME)
Step 5: Edit the A record and change the value to 18.104.22.168
Step 6: Edit the CNAME record and change the value to yourdomainname.com. i.e. domain dot top-level domain dot; the last dot is important!
Step 7: Click "Submit changes". Note that it may take some time (up to a day) for this change to take effect.
Step 8: Log into your squarespace.com account.
Step 9: Visit your Website Management console
Step 10: Click "Custom Domain"
Enter your domain name without a www (and without a trailing dot). It will ask if you also want to create the www - say yes.
That's it! If you don't see any results right away, wait a few hours. DNS changes have to get copied all around the internet once they're made, and can take up to a day to do so.