sudo does not work the way you envision.
You can configure sudo to allow root access to commands, such as gedit, but not specify files. So if you give a user root access to gedit, the user can edit any system file.
Example, for the user joe
joe ALL = /usr/bin/gedit
would grant root access to gedit , but the user could then access and edit any file.
In addition, by default, the root account of Ubuntu is locked and sudo uses the invoking users password rather then a root password. Sudo is however highly configurable so you do not have to access root, you can specify an alternate user with the -u flag. You may then configure sudo to use the target password, root or otherwise. You would have to set a root password.
See http://www.gratisoft.us/sudo/sudoers.man.html and https://help.ubuntu.com/community/RootSudofor details
I think you will want to change ownership on the file in question so the file is owned by root:some_group, add the user to some_group and allow group edits.
Example - How to avoid using sudo when working in /var/www?
Thus gedit does NOT run as root, and the user can edit the file with group permissions.
If you need finer grain control use acl.
If you really wish to confine a use use apparmor.