Optical emission-line gas associated with the radio source 3C 277.3