I called Wizards of the Coast for an official answer, which I'll summarize.
How great weapon fighting works is that it lets the player who has the great weapon fighting style and is using a two handed version of the weapon can reroll all of the damage associated with that weapon.
For example the weapons that fall under this category are a great sword/maul, Flametongue, Frostbrand, Vorpal Sword and that Harizwan from the Hoard of the Dragon Queen. Even the extra damage coming from those weapons can be rerolled as per the great weapon fighting style.
The spells that also allow for this effect are elemental weapon and holy weapon. Specifically because they turn the weapon into a magical weapon that does additional weapon damage. However while all of these weapons and spells allow rerolls, what doesn't allow rerolls are literally whatever isn't coming from the weapon. Like divine smite, half orcs brutal critical (boo I know but I don't think anyone really cares about that one), sneak attack, hex, and hunters mark are all features that have been under debate and all of them don't allow rerolls by the rules.
However saying all of that, I stress that while at a table, the DM has the ultimate authority to allow or not allow this or that rule into the game. Hope I helped clarify how the rules worked to a degree.