I can honestly see both sides here.
Look, the Army has a right to be pissed. Sure, gays can serve in the military, and many do better jobs than enlisted soldiers or officers. Being gay in and of itself does not have any particular bearing on one's capability as a miltiary officer, at least in my admittedly very limited military experience.
But that's not the issue here. The military has a policy against homosexuality. Whether the policy is right or wrong or fits with one's own personal beliefs is not the issue. When you commit to an organization such as the military you have to make a commitment to their policies as well, however much you disagree with them. This is a volunteer organization: no one put a gun to your head to make you sign up. Maybe you were misinformed. Yeah, that sucks, I can relate. But you were still a consenting adult. And hey, things can change. To the OP, if you found out you were gay during your HPSP time and were honest with the Army about the whole thing and then this difficulty happened, yeah, you'd have a beef.
But if you willingly signed up knowing you were gay and that this was against the policy you were agreeing to then I say the Army has every right to drag things out as long as they see fit, if for nothing more than to make an example out of your case. Screw it if it's an outdated policy not in sync with the times of 2007, it's still a policy and it's still on the books, and the OP knew that when he signed onto the HPSP. That's just plain old dishonesty right there, and it renders all the other arguments about whether gays can serve in the military moot. The real issue then becomes well, you lied to the military to get in when it was convenient and then you lied when it might be convenient to get out...gee, what if one day it became convenient to lie to me, and that lie might endanger my life or well-being? How much could I trust you then not to lie to me even though it might be convenient to you? Hmm. Sorry, I gotta take Heeeed!'s side here.