Paynter will take up a three-year contract with the Whites from July 1 after passing a medical at Thorp Arch earlier this week, and his transfer to Elland Road will give Grayson the services of a striker who scored 29 goals for Swindon Town this season.
The 25-year-old was effectively a free agent after coming to the end of his deal at the County Ground and his signing is a first step by Grayson towards replacing League One player of the year Jermaine Beckford, who parted company with Leeds last Friday.
Grayson said: "When we knew he was available we were desperate to get him. He's matured as a player over the last couple of years and he's had a fantastic season."