\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\colorlet{layer}{gray!50}
\colorlet{layerhl}{black!80} % highlighted layer
\tikzset{neuron/.style={draw=#1,circle,minimum width=2pt,inner sep=0pt}}
\newcommand\layer[3]% \layer{name}{size}{label}
{\foreach \i in {1,...,#2}
\foreach \j in {1,...,#2}
\node[neuron=layer] (#1-\i-\j) at (\i,\j) {};
\node[anchor=south] at (0.5*#2+0.5,#2+1) {#3};
}
\begin{document}
\begin{tikzpicture}[x=3pt,y=3pt]
\layer{input}{28}{input neurons}
\begin{scope}[shift={(34,2)}]
\layer{first}{24}{first hidden layer}
\end{scope}
% Highlighted part
\node[neuron=layerhl] at (first-2-24) {};
\foreach \i in {2,...,6}
\foreach \j in {24,...,28}
{\node[neuron=layerhl] at (input-\i-\j) {};
\draw[->,layerhl] (input-\i-\j) -- (first-2-24);
}
\end{tikzpicture}
\end{document}