An accurate spin-polarized exchange-only Kohn-Sham (KS) potential is constructed from a consideration of the optimized-effective-potential (OEP) method. A detailed analysis of the OEP integral equation for the exchange-only case results in a set of conditions which are manifestly satisfied by the exact OEP; these conditions are employed to construct an approximate OEP, ${\mathit{V}}_{\mathit{x}\mathrm{\ensuremath{\sigma}}}$, and therefore an approximate KS exchange-only potential as a functional of KS orbitals. Further, it is shown that this ${\mathit{V}}_{\mathit{x}\mathrm{\ensuremath{\sigma}}}$ can be derived analytically based on a simple approximation of the Green's functions in the OEP integral equation. The constructed potential, although approximate, contains many of the key analytic features of the exact KS potential: it reduces to the exact KS result in the homogeneous-electron-gas limit, approaches -1/r as r\ensuremath{\rightarrow}\ensuremath{\infty}, yields highest occupied-orbital energy eigenvalues ${\mathrm{\ensuremath{\varepsilon}}}_{\mathit{m}\mathrm{\ensuremath{\sigma}}}$ that satisfy Koopmans's theorem, and exhibits an integer discontinuity when considered as a function of fractional occupancy of the highest-energy occupied single-particle state of a given spin projection \ensuremath{\sigma}. In addition ${\mathrm{\ensuremath{\varepsilon}}}_{\mathit{m}\mathrm{\ensuremath{\sigma}}}$ nearly exactly satisfies Janak's theorem. The approximate OEP is a simple but remarkably accurate representation of the exact, numerically derived exchange-only OEP.Detailed numerical results obtained by employing ${\mathit{V}}_{\mathit{x}\mathrm{\ensuremath{\sigma}}}$ as the exchange-only potential for ten atoms with closed subshells yield total energies, Hartree potentials, single-particle expectation values, and ${\mathrm{\ensuremath{\varepsilon}}}_{\mathit{m}}$ which are in excellent agreement with both exact OEP and Hartree-Fock (HF) results and represent a significant improvement over the results obtained by employing other exchange-only potentials. Similarly, the properties of alkali-metal atoms are calculated including the separate spin-up and spin-down densities to obtain results in excellent agreement with those of spin-unrestricted OEP and HF methods. Finally, we demonstrate the accuracy of ${\mathit{V}}_{\mathit{x}\mathrm{\ensuremath{\sigma}}}$ by calculating the total energy, ${\mathrm{\ensuremath{\varepsilon}}}_{\mathit{m}\mathrm{\ensuremath{\uparrow}}}$, and ${\mathrm{\ensuremath{\varepsilon}}}_{\mathit{m}\mathrm{\ensuremath{\downarrow}}}$ as a function of fractional filling f, of the highest occupied single-particle orbital for the magnesium atom (Z=12) from N=9--12 electrons and find excellent agreement with both spin-unrestricted OEP and HF results even when ${\mathrm{\ensuremath{\varepsilon}}}_{\mathit{m}\mathrm{\ensuremath{\sigma}}}$ is strongly dependent on f. In addition we display the integer discontinuity in ${\mathit{V}}_{\mathit{x}\mathrm{\ensuremath{\sigma}}}$ when the highest-energy spin subshell begins to be filled.