If you want to access IO ports you will have to do it from ring 0. With all that "call gate" stuff I suppose you mean an interface from userland to kernel.
I don't know a lot about this, but I suppose you will have to code a driver or kernel module. Then, use it from your userland app.