Stone-Čech compactification. A completely regular topological space is locally compact iff it is open in its Stone-Čech compactification.

A Tikhonov space is locally compact if and only if it’s open in any of its compactifications.

Let $Y$ be dense in a compact Hausdorff space $X$. Suppose that $Y$ is open in $X$, and let $R=X\setminus Y$. Then $R$ is closed, so for each $y\in Y$ there is an open $V_y$ such that $y\in V_y\subseteq\operatorname{cl}V_y\subseteq X\setminus R=Y$; the closed nbhd $\operatorname{cl}V_y$ of $y$ is compact and Hausdorff, so $Y$ is locally compact.

Conversely, if $Y$ is locally compact, let $y\in Y$, and let $V$ be an open nbhd of $y$ such that $\operatorname{cl}_YV$ is compact. Let $W=\operatorname{int}_Y\operatorname{cl}_YV$; clearly $W$ is an open nbhd of $y$ in $Y$, and $\operatorname{cl}_YW=\operatorname{cl}_YV$. Now $\operatorname{cl}_YW$ is closed in $X$, so it’s equal to $\operatorname{cl}_XW$. Let $U=\operatorname{int}_X\operatorname{cl}_XW$; $Y$ is dense in $X$, so $Y\cap U=W$. But $U\subseteq\operatorname{cl}_XW=\operatorname{cl}_YW\subseteq Y$, so $Y\cap U=U$, and therefore $U=W$, and $W$ is open in $X$ as well as in $Y$. Since $y\in W\subseteq Y$, and $y\in Y$ was arbitrary, $Y$ is open in $X$.