How do I get the field label from a node object? I've tried guessing

$node-&gt;field_name-&gt;fieldDefinition-&gt;label
$node-&gt;field_name-&gt;fieldDefinition-&gt;label()


and 

$node-&gt;field_name-&gt;label
$node-&gt;field_name-&gt;label()


but it did not work.
Your first guess was very close, but both are protected properties, so are accessed by getters - functions with the prefix get:

$field_label = $node-&gt;field_name-&gt;getFieldDefinition()-&gt;getLabel();


For reference:

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21FieldItemInterface.php/interface/FieldItemInterface/8.2.x

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21FieldDefinitionInterface.php/interface/FieldDefinitionInterface/8.2.x

Edit:

Btw, in twig you don't need the prefix get, because if you tell twig to get something with the name label, it  tests all possibilities on the object, first it tries to access the property label, then the method label() and finally the getter getLabel().

{{ node.field_name.fielddefinition.label }}