Gallacher needed to win the Italian Open or finish joint second with just one other player to dislodge Graeme McDowell from Paul McGinley's European team for Gleneagles.
The 39-year-old carded a flawless closing 65 at Circolo Golf to give himself every opportunity, but had to settle for third place, three shots behind South African winner Hennie Otto and just a stroke adrift of good friend David Howell, who denied him with a brilliant 63.
Gallacher will hope he has done enough to earn one of European captain Paul McGinley's three wild cards, which will be announced on Tuesday. The world number 34 lives just 35 miles from Gleneagles and has recorded seven top-10 finishes there in his last 12 appearances.
"It was a tall order but I am proud of myself the way I have played," Gallacher said. "I'm delighted with 17 under, it looks just a little short but there is nothing I can do.
"When it comes down to someone else's opinion...I wanted to qualify myself just to take that away. There are four or five guys that are worthy (of a wild card) so it's just what Paul sees."
Howell, who carded an eagle on the first and seven birdies in nine holes from the seventh, said: "I really hope Stephen gets a pick because he would make a fantastic Ryder Cup player.
"It was a supreme effort and if a captain needs an example of a player in form who can play under pressure he has had it this weekend."
Gallacher began the day six shots off the lead and four adrift of second, but birdied six of the first eight holes to be out in 30, at which point he was alone in second and two shots clear of Howell and Joost Luiten.
However, while Gallacher could only pick up one more shot on the back nine, Howell birdied the 11th, 12th, 13th and 15th to edge ahead and ultimately secure his best finish since winning the Dunhill Links Championship in September last year.