While I haven't done it yet myself, I will need to do it for this taxation year, and so I looked into it a bit.
From what I remember, the withheld tax is refundable assuming you lost as much as you won and had no other US income. So, if you lost $4K over the year and had a $4K win that was taxed, you'd get the full refund. I think you need to keep records of your gambling wins and losses (casinos with player's club cards can provide this yearly for slots), and I think also the time you've spent in the US over the last three years.
The first time you apply you apply for an identification number concurrently with the refund application.
It didn't seem complicated to me, but judge for yourself-
http://www.irs.gov/pub/irs-pdf/i1040nr.pdf If that amount of work is worth the 25% the refund companies charge, I'd do it myself. As well, some casinos will give free play when cashing in these government refund cheques (say El Cortez in Vegas, as one example), so you can get another 5% or so from this, up to a certain limit.
The above also assumes you have Canadian citizenship, other countries have better tax agreements where the withholding tax can be refunded (or I guess not collected) on the spot.