The 35-year-old has signed a two-year deal with the League One side.
The Scotland international joined the Latics from Rangers in January 2017 and made 14 appearances as they were relegated from the Championship.
Gilks told the club website: "The interest came and we got the deal done quickly. I'm delighted to be part of this football club."
Gilks is the Iron's second summer signing after the arrival of defender Cameron Burgess from Fulham.
Find all the latest football transfers on our dedicated page.
Scunthorpe United have signed Wigan goalkeeper Matt Gilks on a free transfer.