Generate a cookie when user closes a webform block
First you need to create a custom module and add javascript user identificator on your page with web form(to find out user anonymous or not)
Here is example

Next use jquery library and do the next thing:

// its just an example you need to put your #id or .class
$("#subform_close").on('click', function() {
      if(Drupal.settings.user_js_uid == 0)
           {
              // set cookie for whatever you want
              $.cookie("dont_show_web_form", 1, { expires : 1 });
          }
})


and in your php code 
check for that cookie

$_COOKIE["dont_show_web_form"] 


and hide your webform.