The standard deviation that comes into the denominator also affected by the outlying observation. (It also affects the degrees of freedom because we are actually doing a Welch test here.)
We can examine the influence of changes in that additional observation on the t-statistic:
tinfl <- function(x) t.test(1:10, y = c(7:20, x))$statistic
(or the p-value
tinflp <- function(x) t.test(1:10, y = c(7:20, x))$p.value).
[Adding an observation near 10.18855 leaves the test statistic about where it was without the additional observation (an observation near 9.666492 leaves the p-value where it was).]
This is called an empirical influence function. It's useful for seeing how statistics respond to moving a data point.
So here's what happens to the numerator, denominator and value of the t-statistic as we vary that additional observation:
The red dashed line marks what happens when the additional observation is
10 (somewhere close to where it needs to be to get either the same test statistic or the same p-value as without the observation).
As you move the additional observation up from that, the t-statistic becomes more and more negative (more significant) until you hit about -17.25, and then the effect on the standard deviation (and to some extent the d.f.) starts pulling it back.
As $x\to\infty$, the test statistic goes to -1.
(the limit as $x\to -\infty$ is 1)
You see similar effects with the equal-variance two-sample t-test as well.
The t-test is not particularly robust to very large outliers.
If you had two processes you were interested in identifying location differences in, but there was rare contamination by extreme outliers (from some additional process which was not of interest in the things you wanted to compare with the test), you could robustify the t-test (by modifying the influence function of both numerator and denominator so that they're both bounded), or consider say a Wilcoxon-Mann-Whitney test, so that the effect of the extra observation is more like what you might expect. Or you might consider a permutation test (whether with a robust statistic or not).
Here's the effect on the Wilcoxon-Mann-Whitney test, and a particular form of robustified t-test for comparison - as you see, the Wilcoxon statistic is monotonic, while the robustified t-test only comes back slightly.