Does a deactivated iPhone 4 still have GPS capability?
Yes, the GPS does not need cellular data or cellular service to work. It will get better results when GPS is offline if it can poll the location database and trilateralate from both Wi-Fi and cellular towers, but GPS is generally better than the these secondary sources of location data.

The phone should connect to Wi-Fi regularly to keep the location database up to date - perhaps while tethered to your iPhone 5 for optimal results.

For most situations it will work almost as if it were connected to cellular data and the cellular data switch was off.