WP Loop. If featured image is a panorama (3:1 ratio) execute some code

This is untested, but should be a step in the right direction:

within the loop:

//get url of featured image
$atts = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()));

if ($atts) { //if an image was found
  $width = $atts[1];
  $height = $atts[2];
  if ($width / $height > 3) {
    echo "is at least 3 times wider than it is tall";
  }
}

(old links, used in original answer)

Thanks to Pat J for the tip about wp_get_attachment_image_src(). Much, much better.