Hector said:yer, when you end the main quest all the gates shut.. so don't rush the story if you want to shut as many gates as you can, to milk the rewards.
What are the rewards you can milk from them? To be honest I avoid them like the plague. They're just a PITA for me, so I've been carrying on with other quests and the like instead.