I think rank-and-file employees should have the right to express their own beliefs, as long as it's done in a courteous, considerate way, in an appropriate setting, and that this shouldn't jeopardize their job in any way.
But Eich wasn't a rank-and-file employee. He'd donated a large sum of money to a political cause meant to take away gay people's right to marry. And then, he was appointed to a high-level, policy-making position, in which he'd be responsible for making and enforcing policies that would affect people's lives. I think the firestorm of opposition to his appointment was justified, and resigning was the right thing for him to have done. His statement that, as CEO, he'd be impartial and fair in enforcing policy doesn't sufficiently reassure me that he'd be fair in forming those policies to begin with.
People in high-level, policy-making positions, need to be held to a higher standard, and people need to accept the consequences of their actions. What goes around, comes around.