Although born in England, he qualifies to represent Scotland. He was first selected for the Scotland national football team in August 2010 and made his international debut in August 2012.
Born in Rochdale, Greater Manchester, where he started out with Heyside Juniors, Gilks joined Rochdale at the age of 13. He was promoted from their youth team in 2001. After being coached by Fred Barber, he eventually replaced Neil Edwards in the first team, becoming a regular starter. He made a total of 198 appearances for the club in league and cup competitions, and by the time he was 24, he was the longest-serving player at Rochdale. Being an Oldham Athletic fan growing up, and living about a mile from Boundary Park, he states Andy Rhodes and Jon Hallworth as his heroes.
On 1 July 2007, Gilks signed a two-year contract with Championship club Norwich City, moving on a free transfer due to his contract with Rochdale having expired. He was though, unable to break into the Canaries first team, spending most of the 2007–08 season sitting on the substitutes bench, which also included a spell out of action with ligament damage after twisting his ankle in November 2007 in training.
In the summer of 2008, and without having made a first-team appearance for the Canaries, Gilks signed for fellow Championship club Blackpool as makeweight in a part-exchange deal which saw Wes Hoolahan go in the opposite direction. He made his debut on 12 August 2008 in a 2–0 League Cup defeat by Macclesfield Town.
After failing to break into the first team, and considering quitting the game due to lack of opportunities and a self-perceived lack of ability during a training session, he signed for League Two club Shrewsbury Town on a month's loan on 21 November to cover an injury crisis at the club. He made his debut the following day in a goalless draw with Lincoln City at Sincil Bank. He made three further appearances for the Shrews, with his final match coming on 13 December, a 1–0 defeat by Grimsby Town at Blundell Park, before returning to Blackpool.
While Simon Grayson was Blackpool manager, he did not usually name a substitute goalkeeper, preferring to have five outfield players on the bench. After he left the club, in late December 2008, caretaker manager Tony Parkes immediately began naming Gilks as a substitute. After a number of matches as an unused substitute, Gilks made his league debut for Blackpool on 31 January 2009, after Paul Rachubka was sent off three minutes into the Seasiders' match against Crystal Palace at Selhurst Park. Gilks was brought on and helped the Seasiders to a 1–0 win.
On 22 September 2009, he saved a penalty kick in the Seasiders' 4–3 defeat by Stoke City at the Britannia Stadium in the third round of the 2009–10 Football League Cup. His first league start of the 2009–10 season came in the 2–0 win over Plymouth Argyle at Bloomfield Road on 17 October. After three consecutive clean sheets, Gilks was named in The Championship "Team of the Week", along with teammates Stephen Crainey and Marcel Seip, following his performance in Blackpool's goalless draw with Swansea City on 24 October at the Liberty Stadium. On 16 February 2010, he saved a penalty kick in the 2–0 home win over Middlesbrough. His 200th career Football League appearance came in a 1–0 home win over Ipswich Town on 6 March 2010, when he was also named Man of the Match. In addition, he was again named in The Championship "Team of the Week", following his performance, which saw a fourth clean sheet in five games.
On 13 November 2010, in a goalless draw at West Ham United, Gilks suffered an injury to his knee cap that kept him out much of the remainder of the 2010–11 campaign. After working with former Manchester United Strength and Conditioning Coach Mick Clegg, he returned to the first team on 16 April 2011, in a home defeat by Wigan Athletic. Despite Blackpool's relegation from the Premier League in 2011, Gilks signed a new two-year contract with the club in July. His contract with Blackpool expired at the end of the 2013–14 season. He left the club to sign for Burnley, despite being offered a new contract with Blackpool.
Gilks signed a two-year contract with newly promoted Premier League club Burnley in July 2014. He made his first appearance for Burnley in a League Cup tie; Gilks initially served as a backup to established first choice goalkeeper Tom Heaton.
On 24 June 2016, Gilks signed for Rangers on a two-year deal. He made his debut for the club in a League Cup match against Annan Athletic on 19 July. He played in all five of Rangers' League Cup ties, keeping clean sheets in the first four. Rangers lost 1–0 to Celtic in the semi-final, but Gilks made several excellent saves and was praised by the media and teammates for his performance. Despite these performances in the League Cup, Wes Foderingham remained first-choice goalkeeper for Rangers in their league matches.
Gilks signed for Wigan Athletic on 31 January 2017. On his home debut against Preston North End he saved a Jordan Hugill penalty and the resultant rebound to help his side gain a 0-0 draw.
Gilks signed for Scunthorpe United on 16 June 2017 on a free transfer, becoming the Iron's first choice goalkeeper.
On 22 August 2010 the Scottish FA confirmed that manager Craig Levein was considering Gilks for a call-up to the Scotland national squad for their upcoming UEFA Euro 2012 qualifiers against Lithuania and Liechtenstein. Gilks qualifies to play for Scotland through his Scottish grandmother. Levein said of Gilks: "He is one we became aware of a while ago and have kept track of his progress. Obviously he was a key figure in Blackpool’s promotion to the Barclays Premier League and while I will not name my squad until tomorrow, he is one I think we need to take a closer look at. He comes highly recommended, is playing regularly for his club and the next logical step is for our goalkeeping coach to work closely with him."
Two days later he was selected in the Scotland squad, joining fellow Blackpool player Charlie Adam. On his call up Gilks said: "My grandmother was Scottish and they've traced the roots back and checked it. I'm eligible and it's great to be in the squad. Everybody knows that I am English but England doesn't come knocking on the door of Blackpool Football Club and I think that's a problem. They look at the bigger clubs. To be honest it was nice of Scotland to come and have a look at me and find out about me."
In November 2010, Gilks had to withdraw from the Scotland squad through injury. He again withdrew on 10 August 2011, hours before kick-off in a friendly against Denmark, with an ankle injury. On 15 August 2012 he made his debut for Scotland as a first-half substitute in a friendly against Australia.As of 08:20, 5 January 2017 (UTC)
As of match played 10 September 2013
BlackpoolFootball League Championship play-offs: 2009–10
Blackpool player of the year: 2013–14