You can get the user ID from the WP Users page. You can get the Event Espresso Contact ID from the Event Espresso > Registrations > Contact list admin page.
In this example, the user ID is 18 and the Event Espresso Attendee ID is 862.
Available here: Debug Bar Debug Bar Console
You click on the Debug Bar link, then Console add add the following code, replacing the User ID and Meta Value.
<?php
global $wpdb;
$user_id = 18;
$meta_key = $wpdb->prefix . 'EE_Attendee_ID';
$meta_value = 862;
add_user_meta( $user_id, $meta_key, $meta_value, true );
?>
Then you click Run.
If anybody out there is still needing to use this code, like me, I have used it with the Code Snippets plugin rather than using Debug Console, since I already have that plugin installed for other reasons. I made a new snippet that is set to only run once. Worked like a charm. Thank you Josh for keeping this post here!