The syntax in the example you are giving is acceptable for gnuplot's own extended text mode, as well as for LaTeX. Therefore enough to say
set termopt enhanced
Most gnuplot output modes ("terminals") will accept this.
But gnuplot's advanced text mode only handles a small subset of LaTeX. If you need more complex things, you will need to use one of the LaTeX terminals. In this case, do not enable the extended text mode, since you want to transfer the entire line to LaTeX without processing.
sfeam source share