How can the energy-momentum tensor influence the metric outside an energy-momentum distribution? The elements in the energy-momentum tensor are determined by the mass-energy-impuls distribution as viewed from an inertial frame.
So, if you see a collection of masses with different momenta you can fill in their values in the MEI-tensor and calculate the metric by applying the Einstein field equations.
My question is hoe that gives you the values of the metric outside of the masses. Outside the masses the components are all zero, so you would expect a flat metric, which obviously is false. Is there a kind of analytical continuation going on?
Let me give an example of what I mean. Take a point in the vacuum around the Earth. Clearly the energy-momentum tensor is zero. How does one calculate the components of the metric at that point? What's different from calculating the metric of a "totally empty" vacuum? You need infinitesimal differences of the metric in the first place to plug in the equations.
 A: 
So, if you see a collection of masses with different momenta you can fill in their values in the MEI-tensor and calculate the metric by applying the Einstein field equations.

If you look in detail at the Einstein Field Equation (EFE) then you will see that it is a differential equation. This means that the EFE relates the stress-energy tensor (SET) not directly to the metric but rather to specific patterns of changes of the metric.
So according to the EFE having a 0 SET does not imply that the metric is flat. It only implies that some specific changes of the metric are zero. Solutions to the EFE for a 0 SET are called vacuum solutions, and there are many. They include solutions like the Schwarzschild solution where a massive sphere propagates spherical curvature outside itself, where the SET is 0. But they also include gravitational waves where ripples in the metric propagate through regions where the SET is 0.
The basic point is that because they EFE is a differential equation, it is incorrect to assume that the metric will be 0 simply because the SET is 0.
A: The absence of energy-momentum ma only requires the space to be Ricci flat. In other words it requires $R_{\mu\nu}\equiv  {R^{\lambda}}_{\mu \lambda\nu}=0$ and not that  ${R^\mu}_{\nu\sigma\tau}=0$.
A: This passage from Hawking & Ellis addresses your question with some more specific details.
(Based on a very old post by me at https://www.physicsforums.com/threads/there-is-no-gravitational-dipole.80710/post-691492 )
There is a curious equation (4.28) in Hawking/Ellis - The Large Scale Structure of Space-Time (p. 85) that has always intrigued me. Sometimes these are called "quasi-maxwellian equations".

[p.85]
The Riemann tensor can be expressed in terms of the Weyl tensor and the Ricci tensor:
$$R_{abcd}=C_{abcd}-g_{a[d}R_{c]b}-g_{b[c}R_{d]a}-\frac{1}{3}Rg_{a[c}g_{d]b}.$$
The Ricci tensor is given by the Einstein Equations:
$$R_{ab}-\frac{1}{2}g_{ab}R+\Lambda g_{ab} = 8\pi T_{ab}.$$
Thus the Weyl tensor is that part of the curvature which is
not determined by the matter distribution.
However it cannot be entirely arbitrary as the Riemann tensor must satisfy the Bianchi Identities
$$R_{ab[cd;e]}=0$$
They can be rewritten as
$$C^{abcd}{}_{;d}=J^{abc} \qquad (4.28)$$
where
$$J^{abc}=R^{c[a;b]}+\frac{1}{6}g^{c[b}R^{;a]}\qquad (4.29)$$
These equations are rather similar to Maxwell's equations in electrodynamics:
$$F^{ab}{}_{;b}=J^a$$
where $F^{ab}$
is the electromagnetic field tensor and $J^a$
is the source current. Thus in a sense one could regard the Bianchi Identities (4.28) as field equations for the Weyl tensor giving that part of the curvature at a point that depends on the matter distribution at other points.
(This approach has been used to analyze the behaviour of gravitational radiation
in papers by Newman and Penrose (1962), Newman and Unti (1962) and Hawking (1966a).)

Note: The first equation to decompose the Riemann tensor is described in
Ricci decomposition.
Intuitively, the Ricci tensor is determined algebraically by the stress-energy tensor. The Weyl tensor is determined by the gradients of the stress-energy tensor.
(My question in the physicsforums post asked about the $J^{abc}$ tensor and these quasi-maxwellian equations (4.28). Actually, I was and still am curious about the geometrical properties of the tensor
$R_{ab}-\frac{1}{6}g_{ab}R$ (which I now know is essentially the Schouten tensor), where $J^{abc}=R^{c[a;b]}-\frac{1}{6}g^{c[a}R^{;b]}$ is (4.29) with the antisymmetric indexing on the second term rewritten. )

update:
To address the OP's comment to @mikestone 's answer

How is the presence of the mass expressed when you don't know the metric in advance?

this passage from Geroch's General Relativity: 1972 Lecture Notes (ISBN 978-0987987174 ) may be helpful,

[p.83] Ch 20: Einstein’s Equation: General Remarks 
Consider Maxwell’s Equations, Eqns. (25) and (26). It is often the
case in practice that one adopts the following attitude toward these
equations. The charge-current $J^a$ is given, and one wishes to solve
(25) and (26) for the electromagnetic field, $F_{ab}$.
This would be the situation,
for example, if we were given the current in a system of wires
(i.e., given $J^a$), and wished to find the resulting the electromagnetic
field. In other situations, however, the charge-current is strongly influenced by $F_{ab}$, and so no such procedure is available for solving (25) and (26). This would be the case, for example if we were dealing with
a cloud of charged particles, so the value of $F_{ab}$ determines the motion of the cloud, and hence $J^a$. ...

How does Einstein’s equation fit into this framework?
It is unreasonable
physically to regard $T_{ab}$ as given (on a manifold), with Einstein’s
equation (44) to be solved for the metric $g_{ab}$. The reason is
that $T_{ab}$ itself is a quantity which refers,
not only to "matter", but also to "geometry".
Consider, for example, the stress-energy of a
fluid, $T_{ab} = (\rho+p)\xi_a \xi_b +p g_{ab}$.
Now, $\xi^a$, the four-velocity of the fluid,
is unit ($\xi^a \xi^b g_{ab} = −1$); $\rho$ is the mass density in $\rm grams/sec^3$; the metric occurs in the second term.
Everywhere, we see the metric, directly or indirectly, in the stress-energy. One should not regard "specifying $T_{ab}$"
as the same as "specifying what the matter is doing".
The relation between $T_{ab}$ as a tensor field and
"what the matter is doing" involves the metric.
It appears that it is simply impossible to make
any reasonable description of matter
without the notions of space and
time provided by the metric.

In light of the remarks above, one might be tempted to proceed
in the other direction. We give $g_{ab}$ and "solve" (trivially) (44)
for $T_{ab}$.
One could indeed regard the result as a "solution" of Einstein’s
equation. The difficulty is that the resulting $T_{ab}$
will not, without extraordinary luck, resemble any kind of matter of interest.

...
Hence, gravitation [as a "type of matter" field] gets inseparably intertwined with geometry.
Thus, the metric, $g_{ab}$ has two roles: as giving geometry of space-time, and as a gravitational potential. (Think of $g_{ab}$
as analogous to Newtonian $\varphi$.
Then $\nabla_a \nabla_b \varphi$  is analogous to the “second derivative” of the metric, i.e., to the Riemann tensor. That’s what we want from Sect.
19.)

Italics in the last paragraph and bolding are by me.

A: 
... how that gives you the values of the metric outside of the masses.
Outside the masses the components are all zero, so you would expect a
flat metric, which obviously is false. Is there a kind of analytical
continuation going on?

Metric is spacetime. Its existence presuppose a presence of matter there. A solution of Einstein field equations (EFE) for a given matter distribution, the metric describes, the whole spacetime.  As second order differential equations EFE are defined locally. However, their boundary conditions act globally, see for example https://physics.stackexchange.com/a/679431/281096 from equation (7).
