Got this error while running a PowerShell script that creates Navigation in the portal.
Adding the logged in user as to Site Collection Administrator group fixed the issue.
http://alstechtips.blogspot.in/2014/07/sharepoint-2013-access-is-denied.html
Hope it helps..