How to check if a basic page is published?
If you look in the core theme file core/themes/stable/templates/content/node.html.twig under "Available variables:" you'll find


  node.isPublished() will return whether the node is published or not.


Can also be found here.

Which means you can do:

{% if node.isPublished() %}
  {# content for published nodes #}
{% endif %}


Edit by OP: (17/08/2017)

The above was a partial answer, but I also had the problem that the twig file I needed do this check in wasn't associated with the node I needed to check the published state of. So, using something like menu_get_object wouldn't work. 

Since Drupal doesn't seem to have any easy function to get a node by ID/Alias, I created the following function to get a node by URL alias:

public static function getPublishedStateByPageAlias($pageAlias)
{
  $nodeIsPublished = false;

  // Get node path from alias
  $path = \Drupal::service('path.alias_manager')-&gt;getPathByAlias($pageAlias);

  // If there is a valid path
  if(preg_match('/node\/(\d+)/', $path, $matches)) {
    // Get the node from the path
    $node = \Drupal\node\Entity\Node::load($matches[1]);
    // Start an entity manager
    $node_storage = \Drupal::entityManager()-&gt;getStorage('node');
    // Get the relevant node by its ID using the entity manager
    $chosenNode = $node_storage-&gt;load($node-&gt;id());

    // Is it published?
    $nodeIsPublished = $chosenNode-&gt;isPublished();
  }

  return $nodeIsPublished;
}


I could then call this function in my site's custom module, pass the result to the relevant twig file as a boolean variable, and conduct the necessary check.