  A worldsheet realization of the refined topological string is proposed in
terms of physical string amplitudes that compute generalized N=2 F-terms of the
form F_{g,n} W^{2g}Y^{2n} in the effective supergravity action. These terms
involve the chiral Weyl superfield W and a superfield Y defined as an N=2
chiral projection of a particular anti-chiral T-bar vector multiplet. In
Heterotic and Type I theories, obtained upon compactification on the
six-dimensional manifold K3xT2, T is the usual K\"ahler modulus of the T2
torus. These amplitudes are computed exactly at the one-loop level in string
theory. They are shown to reproduce the correct perturbative part of the
Nekrasov partition function in the field theory limit when expanded around an
SU(2) enhancement point of the string moduli space. The two deformation
parameters epsilon_- and epsilon_+ of the Omega-supergravity background are
then identified with the constant field-strength backgrounds for the
anti-self-dual graviphoton and self-dual gauge field of the T-bar vector
multiplet, respectively.
