It sounds like an unjust situation and I can understand being disappointed at what happened, but honestly I'd call it a win. You now have Google on your resume so you're setup for a much easier job search in the future.
You really haven't lost a lot: Google is now a typical big company with a lot of political stupidity that you have to navigate. You've just seen it for yourself: if HR is making decisions rather than engineers, then the environment isn't so good.
You'll have better quality of life, more of an impact, and more focus on coding at a smaller company.