I was battling a Gengar and used Brick Break and it hit. Is that because it's part Poison or is it a glitch?
No Miracle Eye, just a mistake.
If you used the move Odor Sleuth, Miracle Eye, or Foresight, then your Fighting type attacks can hit Ghost types. Pokemon with the ability Scrappy can also hit Ghost types with Fighting type attacks.
If Machamp used Brick Break then it will hit Gengar, because Machamp's ability No Guard means all moves will hit the opposition regardless of type immunities or move accuracy.