How can I programmatically enable permission for anonymous users to view comments on a single node?
There are a couple ways to handle this and it depends on when you want to make the change.

What you'll want to change is $node->comment to one of the following:


COMMENT_NODE_CLOSED
COMMENT_NODE_HIDDEN
COMMENT_NODE_OPEN


You could use a hook_node_presave() function to change the value prior to saving based on some logic.  Or you just need to get access to the node object through other means like node_load().  Just make sure to save the node if you're loading it up to make the change.