If you think backlinking to .gov websites will give you good backlink credit, them I am afraid you have to look for another alternate. Most of the .gov/ .edu/ .org websites (if these websites are authority websites) have nofollow links.
Second thing, every backlink carries equal weightage (I mean extensions donít affect backlinking credit) whether they are .gov backlink or twitter backlink.
But if you are really intent on it, you can use a tool called 'Keyword Country' for finding .edu and .gov backlinks. I use it to find quality sources for link-building and that too in a completely natural and legitimate way...