Gar flesh is generally edible — Texas Parks and Wildlife notes alligator gar meat is white, firm, and mild — but gar eggs are toxic and can make people sick if eaten. That is the main “poisonous” risk people mean when asking about gar.
Like other fish, gar can also carry environmental contaminants (such as mercury) depending on the waterbody, so local fish-consumption advisories matter. Always skip the eggs/roe and check current state guidance before eating gar from a given river or lake.
Source: Texas Parks and Wildlife — Are Alligator Gar Safe to Eat?