Entrywise absolute value matrix and second largest eigenvalue. Suppose $A=(a_{ij})$ is a Hermitian $n\times n$ matrix such that the symmetric matrix $\vert A\rvert=(\lvert a_{ij}\rvert)$ has a largest eigenvalue $\lambda_1(\lvert A\rvert)=1$, and all other eigenvalues satisfy $$\frac{1}{2}\ge \lambda_2(\lvert A\rvert)\ge\dots\ge \lambda_n(\vert A\rvert)\ge-\frac{1}{2}.$$
Let $x$ be the normalised eigenvector of $A$ corresponding to eigenvalue $\lambda_1(A)$. Then 
$$\lambda_1(A)=\langle x,Ax\rangle = \lvert\langle x,Ax\rangle\rvert \le \langle \lvert x\rvert,\lvert A\rvert\lvert x\rvert\rangle\le \lambda_1(\lvert A\rvert),$$
but what can be said about $\lambda_2(A)$? For example is it true that for sufficiently small $\epsilon>0$ there exists a small $\delta=\delta(\epsilon)>0$ such that 
$$\lvert \lambda_1(A)-1\rvert<\delta\quad\implies\quad \lambda_2(A)\le\frac{1}{2}+\epsilon?$$
If yes, how can $\delta(\epsilon)$ be chosen? 
 A: The answer to your question is yes.
First of all, consider the case $\lambda_1(A) = 1$. 
Note that $A_{ij} = 0$ if $x_i \ne 0$ and $x_j = 0$: otherwise you could increase $\langle y, |A| y \rangle/\langle y, y\rangle$ by taking $y = |x| + t e_j$ for some small $t$ (the numerator is $1 + c t + O(t^2)$ for some $c > 0$, the denominator $1 + O(t^2)$). 
Thus (reordering the rows and columns if necessary) if some $x_i = 0$ the matrix $A$ has block form $\pmatrix{B & 0\cr 0 & C\cr}$, and its eigenvalues are the union of the eigenvalues of $B$ and of $C$, and similarly for $|A|$ with $|B|$ and $|C|$; $1$ is an eigenvalue of $B$ and of $|B|$ while all eigenvalues of $|C|$  are at most $1/2$.  Then all eigenvalues of $C$ have the same bound.  Thus we can restrict our attention to $B$, i.e. we may assume all $x_i \ne 0$.
Let $U$ be a diagonal matrix with diagonal entries $u_{ii} = x_i/|x_i|$.
We have $\langle x, A x \rangle = \langle |x|, |A| |x| \rangle = 1$ which
implies all the terms $\overline{x_i} A_{ij} x_j \ge 0$, i.e. $|x_i| \overline{u_{ii}} A_{ij} u_{jj} |x_j| \ge 0$, so $\overline{u_{ii}} A_{ij} u_{jj} \ge 0$.  This says $|A| = U^* A U$.  But then $|A|$ and $A$ have the same eigenvalues, so $|\lambda_2(A)| \le 1/2$.
Finally, note that the set of Hermitian matrices satisfying your condition is compact.
If the answer were no, then there would be $\epsilon > 0$ and a sequence of such matrices $A_k$ with
$\lambda_1(A_k) \to 1$ and $\lambda_2(A_k) > 1/2 + \epsilon$.  Taking a limit point, we get $A$ satisfying the condition with $\lambda_1(A) = 1$ and $\lambda_2(A) \ge 1/2 + \epsilon$, which as we have seen is impossible.
