Yes, if your iPhone has its location services turned on and can get a cellular signal and has WiFi on. It can report local WiFi networks and their locations back to Apple.
It uses either the GPS (only if its being used by something else), cellular triangulation, or other known WiFi points. It also uses Apple's implementation of SkyHooks.