The 27-year-old Lenzie Bowling Club player won four matches in the competition at Warilla in New South Wales.
But two key defeats suffered in tie-break deciders proved crucial as he finished in fifth place in the nine-player pool and failed to make it into the semi-final play-offs.
Ansari opened against Hong Kong’s Kevin Fung and got off to a great start by taking the opening set but lost the second and the Hong Kong player edged the tie-break 4-2.
Another defeat followed at the hands of Australian three-time winner Jeremy Henry before Gavin got off the mark with victory over Canada’s Vincent Mai.
After losing to Fiji’s Samuela Tuikiligana Ansari again came back with a fine win 10-4 3-11 4-1 over South Africa’s Rudi Jacobs.
Next up was a crunch match against Spain’s Peter Bonsor but after both regulation sets had ended in 6-6 ties the Spaniard took the tie-break 4-2.
An 8-4 14-2 demolition of Turkey’s Ozkan Akar gave Gavin his third win but he then went down 8-5 11-7 to Homer Mercado of the Philippines to end his hopes of reaching the play-offs for a semi-final spot. However his competition on a high note with a 10-3 11-2 win over Japan’s Jun Koyama.