The Attack attribute you see on your Loadout screen is a combination of your Hero Attack and Weapon Attack with a bonus for Gun Mastery permanent upgrade together with any Attack % bonuses (e.g. Firebug at 30 gives +7% Attack; or some heroes have it in their skill tree):
Loadout Attack = Hero Attack + Weapon Attack * (1 + Gun Mastery / 100) * (1 + Attack % Bonus/100)
(The Hero Attack you see on the Hero screen will already includes the Attack % bonus)
You can estimate the Loadout Attack (and Loadout Health) using the Hero Stat Simulator