I recently installed gedit via macports (sudo port install gedit) which installed about 100 other unrequested packages as dependents (including things like X11, GTK, and aspell - stuff I definitely don't need in OS X).
Later I ran sudo port uninstall gedit, which worked great, but left all the other packages on my system. After attempting to run sudo port autoremove and sudo port autoclean (neither of which exist), I finally found the answer... and it's not very elegant.
I first found the command sudo port uninstall inactive which, as the documentation reads, is the solution. In my case, it's not. You might want to try it though.
I found that MacPorts refers to packages which were "installed ports that are unrequested and have no dependents" as leaves. Once you wrap your head around that, take note that many leaves may be dependent on other packages which were "unrequested." So, once you uninstall all your leaves, you'll have a whole new set of leaves. MacPorts doesn't seem to have a method to handle this recursion, so you have to iterate over your remaining leaves until there are none left.
Long story short, run this over and over again until it stops uninstalling packages: