Stevenson, who lives in Troon, decided to hang up his boost just days after playing in goal for Raith Rovers in the defeat by Ayr United last month after the Kirkcaldy club had been left with a goalkeeping crisis.
But the one-time St Johnstone, Patrick Thistle, Ipswich, Ayr United and Dumbarton player has performed a u-turn.
Troon manager Gordon Burns said: “I am delighted we have recruited someone of Ryan’s calibre, it’s not only good for us but for junior football as a whole.
“It’s a tremendous boost for everyone at our level and I’m really looking forward to working with him.
“A player of his quality and experience will have a great impact in the dressing room, particularly on our younger players, and will help raise the standards of everything we do.
“It’s a fantastic statement of intent for everybody, a real sign that Troon mean business and a real show of ambition.”
Chairman Jim Kirkwood added: “When I became aware from my management team that there was the possibility of signing Ryan we tried to move as quickly as possible to make it happen and after discussion with our main sponsor we have been able to strike a deal that suits all parties.”