Thought I would post this as it was pretty simple and potentially useful to anybody else using Hubspot and Gravity Forms. This is an easy way to pre-populate Gravity Forms with Hubspot data based on the user's Hubspot cookie.
$cookie = $_COOKIE["hubspotutk"];
$url = "http://api.hubapi.com/contacts/v1/contact/utk/".$cookie."/profile?hapikey=YOUR_HUBSPOT_API_KEY";
$data = file_get_contents($url);
$data = json_decode($data);
global $firstname;
$firstname = $data->properties->firstname->value;
add_filter('gform_field_value_fname', 'fname_population_function');
function fname_population_function($value){
global $firstname;
return $firstname;
}