Just as with "circle," there is a notion of "line segment" which makes sense in any metric space:
In a metric space $\mathcal{M}=(M,d)$, given points $a,b\in M$ the line segment between $a$ and $b$ in $\mathcal{M}$, denoted "$\overline{ab}_\mathcal{M}$," is the set of "intermediate" points $$\{c\in M: d(a,c)+d(c,b)=d(a,b)\}.$$
Basically, $\overline{ab}_\mathcal{M}$ consists of those points which are "efficiently on the way" from $a$ to $b$ in the sense of $\mathcal{M}$.
However, this notion behaves rather weirdly in general!
Most obviously, a line segment may be (almost) empty. For example, consider a silly (= discrete) metric space $\mathcal{D}=(D,s)$ where we set $s(x,y)=1$ whenever $x\not=y$. If $a,b$ are distinct points then $\overline{ab}_\mathcal{D}=\{a,b\}$ - there are no "points in the middle" at all.
We can also have "line segments" look very different from lines, even when up to topology our metric space is very nice. Consider the taxicab metric space $\mathcal{T}=(\mathbb{R}^2,t)$ on $\mathbb{R}^2$. The topologies $\tau_t$ and $\tau_{euc}$ on $\mathbb{R}^2$ induced by $t$ and by the usual (Euclidean) metric respectively are homeomorphic, but for example we have $$\overline{(0,0)(1,1)}_\mathcal{T}=[0,1]^2$$ (this is a good exercise).
In fact, the above notion of line segment turns out to be pretty poorly behaved in general, and to my understanding doesn't wind up playing much of a role in the general study of metric spaces. Instead, the more complicated notion of a geodesic turns out to be important.