I beat the grass gym by using brave bird on blaziken killing the opposing breloom before i died. the message in the bottom said i won, but i received nothing. it said breloom fainted before it said blaziken fainted, and said i won after both of those messages.
In order for you to truly beat the Grass Gym, you must still have pokemon alive in your party when you beat the leader's last pokemon. If your last pokemon died from recoil and you killed the leader's last pokemon, that will not count. Sorry for the inconvenience. If there's anything else, feel free to let us know!