As an administrator you can always take ownership of something. However I'm not sure how you're even running your machine if you locked yourself out of the root. If you can run Windows Explorer then you should be able to right click the C: drive and select Properties. You might get access denied messages but it should still get you into the UI. In my experience one way to make this easier is to right click the File Explorer icon in the shell and select Run as Administrator so it starts elevated.
Once you're in the Properties tab for the drive go to the Security tab and give Administrators full control and Users Read/Execute/List permissions. Permissions can be inherited and it isn't clear whether you just removed permissions on the root drive or reset it all the way down. Therefore I would just adjust the permission on the root drive and assume the inherited security is correct. If for some reason you cannot reset the permissions then check to see if the Administrators group is the owner. By default the TrustedInstaller is but if you take ownership then you should then have permissions to make changes.
If not even that works and you don't have another admin account to use then your options are limited mainly because you don't know how badly the machine is broken. If you have another Windows machine available then disconnect the HDD from your current machine, hook it up temporarily to another working machine as a secondary drive. Then on the Windows machine that is working set the permissions as mentioned earlier. Remember in all cases to use the Administrators group and not your personal account. Once you've done that put the drive back into the original machine.
If that doesn't work, or alternatively if you want to try first, restart WIndows in the recovery mode (takes 2 reboots) and go to safe mode to see if you have permissions there. If not then have windows fix startup problems to see if it'll reset things. If that doesn't work then a repair is next. If nothing else works then your last resort is to reinstall Windows.