I have this query and as you firstName contains single quote Anthony O\'Neil
:> g.addV(\'person\') .property(\'firstName\', \'Anthony O\'Neil\') .
Escape the apostrophe using \
So your Gremlin becomes:
:> g.addV('person') .property('firstName', 'Anthony O\'Neil') .property('lastName', 'Andersen') .property('age', 44)