The plane
$x+y+z=0$ (where $(0,0,0)$ is the centre of the middle cube)
passes through
19 of the 27 cubes, namely the ones whose centres have coordinate-sums -1,0,+1 rather than -3 (one), -2 (three), +2 (three), +3 (one).
This is best possible for the following reason.
Pair cubes up with their "opposites" (with all coordinates negated). Suppose our plane has equation $ax+by+cz=0$ (the RHS must be 0 because of the stipulation that the plane passes through the centre of the cube). Since the problem is symmetrical under reflection in any coordinate plane, we may without loss of generality assume $a,b,c\ge0$. Since the problem is symmetrical under permutation of the coordinates, we may in fact assume $a\ge b\ge c\ge0$. Now consider the "all-$+$" and "all-$-$" corners of the cube; I claim we can find four cubes near each corner that are not cut by the plane.
Specifically
the small cube in the all-$+$ corner has all coordinates $>0$ at all corners, so all corners are on the $+$ side of the plane, so the cube is not cut. What about the three neighbouring cubes? Their "most-$-$" corners have coordinates two of which are $+\frac12$ and one of which is $-\frac12$. All the other corners of all these cubes are all-coords positive, and therefore lie on the $+$ side of the plane; so one of these cubes can be cut only if its $(+\frac12,+\frac12,-\frac12)$-like corner is on the $-$ side, i.e., if a relation like $a+b-c<0$ holds. Only one of these is possible, namely $(-\frac12,+\frac12,+\frac12)$ which is on the $-$ side if $a>b+c$.
Now
there are two possibilities. Either that relation doesn't hold, in which case all four of the cubes in the all-$+$ corner are on the $+$ side of the plane -- in which case likewise all four of the cubes in the all-$-$ corner are on the $-$ side of the plane -- or else it does hold, in which case only three of our four corner cubes on each side lie entirely on the right side of the plane. But in the latter case we can find another cube on each side that isn't cut.
Namely,
the cube bounded by $x=+\frac12,+\frac32$, $y=-\frac12,+\frac12$, and $z=-\frac12,+\frac12$. The "furthest-$-$" corner of this cube is $(+\frac12,-\frac12,-\frac12)$, which is on the $+$ side of the plane; so this cube is not cut.
So
in either case we have found four cubes on each side of the plane that aren't cut by it and therefore there are eight uncut cubes. So the 19 cut cubes we get from $x+y+z=0$ can't be beaten.