If I put my iPhone in airplane mode with Wi-Fi on, will the GPS work?

I'm traveling abroad and would like to geotag my photos, but I don't want to incur data charges. If I turn on Wi-Fi but leave the iPhone in airplane mode, will the GPS work properly?

Yes, but not 100% accurately. It won't be exact GPS (like with phone data), but rather location based on the Wi-Fi router that you are connected to and the ISP that it is using; it can be anywhere from >1m to 100m or more from your actual location; but if you're just geotagging by city, it works just fine.

My understanding and experience is that the GPS will still work, but won't be very accurate as a lot of that functionality is based on cell tower triangulation. However if there are tall buildings this will interfere with the GPS signal that gets to the already weak iPhone internal GPS antenna. You could turn off data roaming and leave the phone service active, and this should help as long as the map data is preloaded on the phone.

GPS will work fine in airplane mode but Wi-fi won't.

Airplane mode disables all radio transmitters in the phone, that means bluetooth, Wi-Fi and the cell network. Since GPS is receive only it still works.

If you want to keep Wi-Fi on but avoid roaming charges then you need to disable roaming on your phone and take it out of airplane mode.
If you can't find the setting to do that you could ask your phone company to disable it on your account from their end.