Is iphone purchased from Canadian online Apple Store factory unlocked? I could not find iphone stack exchange site so I am posting here.
On Canadian Apple store iphone 4 is available for $659. Is this iphone 4 is the same iphone as factory unlocked new iphone 4 being sold on ebay for over $800? I am confused about the price difference if they are exactly same phones. Also would this iphone work with any GSM carrier in USA or other countries?
Yes, they are unlocked,  The price is going to be substantially higher since its not the subsidized price. They will work with any compatible GSM carriers including prepaid providers. 

Some carriers (for instance T-Mobile USA) currently operate at a different radio frequency for their 3G data than the iPhone supports, so although being able to access data over the EDGE network (slower network that is used on virtually all GSM networks), it will not be able to take advantage of those 3G data services. 

Purchases from the apple store online can only be shipped to the country of that specific apple store. So if you live in an area where they don't offer the unlocked versions of the phone, for instance in USA, the only way you would be able to get the unlocked version would be through someone who can have it shipped to their country. I am assuming that the factory unlocked versions being sold on eBay are from people who have realized this. Hope this makes sense. 
Check out the FAQ section of the iPhone product page at the Canada Apple Online store which can probably answer any other similar questions.
http://store.apple.com/ca/browse/home/shop_iphone/family/iphone