Gannon has a weapon very similar to that if the guardians. If I am wearing the ancient armor and any other gear I can use to better defend against guardian attacks, will it also give me better defense against the ranged attack that Gannon has?
Yes, Gannons beam attack along with his melee weapons are all the same as the guardians weapons. Using anything you can to defend against the attacks of the guardians will also help mitigate the damage that Gannon deals.
The ancient armor is one of the best in the game, even without it’s bonus. Wearing it in general is a good idea, but it will also give you some bonus defense due to the guardian resistance perk that it grants.