The former IRB World Player of the Year crossed for the second of his scores with less than two minutes remaining to set up Dan Biggar's match-winning conversion in a 31-30 victory at the RDS.
Leinster went into the season finale as heavy favourites following their Heineken Cup hammering of Ulster just eight days earlier but Williams and co emerged as league champions for the second time in three years.
It was also the third time in three attempts this season that the Ospreys had got the better of Europe's top dogs and Williams feels it shows just how dangerous they could be when the 18th Heineken Cup gets underway next autumn.
"We've shown that we can compete with the likes of Leinster," said Williams.
"Leinster are one of the best sides European rugby has ever seen, right up there with Toulouse and Munster.
"They are a fabulous side but we are also a good side and everyone could see how much this mattered to the boys and how much they wanted it.
"We can come to the RDS and play a full-strength side and come away with a victory under pressure. That's the sign of a good team.
"We have a lot of young players coming through like Ashley Beck and Jason Tipuric so I believe we have the players to be competitive in the Heineken Cup."
Williams has endured his fair share of Heineken Cup heartache during his time with the Liberty Stadium outfit and he knows that success in Europe's premier club competition has to be the next step for Steve Tandy's men.
The 35-year-old Wales and Lions star played in three losing Heineken Cup quarter-finals as the Ospreys fell to Saracens, Munster and Biarritz Oympique in 2008, 2009 and 2010 respectively.
Never making it past the last eight is a major disappointment from a career packed with great achievements but Williams insists that winning the most sought-after prize in northern hemisphere rugby is no easy task.
"Naturally I would have liked to have been successful in the Heineken Cup but that eluded me and that is a bit frustrating," added Williams, who played in 64 European ties with Neath and then the Ospreys.
"Everyone alludes to the Heineken Cup all the time, but it's a tough competition, playing the best teams in Europe and some of them are the best teams in the world - it's tough.
"I've had a great time with the Ospreys and this is a fantastic way to hang my boots up.
"I will never forget this day and it's nice to be retiring with some silverware - this is up there with anything else I have achieved."