Expanding on a comment by @egreg, it is simpler to use \etocthename. It contains simply as a macro the section name as present in the .toc file. Of course you can have formatting macros therein. The \etocname is a robust macro which additionally contains hyperref stuff. The \etocthename expands in one step to the name from the .toc file (which may very well contain boxes, \color, \textbf or whatever..)
update:
The OP's code amended to use \etocthename. Also, I have added \noindent and \par, as this probably what will be used anyhow.
\documentclass{article}
\usepackage{xcolor}
\usepackage{xstring}
\usepackage{etoc}
\etocsetstyle{section}
{}
{\noindent}
{\IfStrEq{bla}{\etocthename}{\color{blue}\etocname}{\color{red}\etocname}\par}
{}
\begin{document}
\tableofcontents
\section{bla}
\section{blub}
\end{document}

note: the \tableofcontents is always typeset by etoc inside a group, which limits the scope of the \color command, but in real application here you may want to add braces to limit more locally the use of the \color (for example if page numbers are incorporated to the TOC via \etocpage, to not contaminate them.)
note: testing \etocthenumber rather than \etocthename could be easier.
\etocthelinkednameinstead of\etocname, but be careful that\IfStrEqdoesn't work with several commands (say\textbfor accents) in its arguments. – egreg Jun 12 '17 at 13:45\etocthenameis perhaps better:\etocthelinkednameis a wrapper including hyperlinking hyperref stuff. – Jun 19 '17 at 21:29