According to Gauss' law, the gravitational field $g$ is proportional to $r^{d-1}$, where $r$ is the distance to the single gravitating object and $d$ is the number of spacial dimensions. Unfortunately, when $d = 1$, there exists no falloff of the field when moving further away from object. However, inside the object, where density is not null, there is gravitational field gradient.
In relativity, trajectories of non-interacting particles drawn on a spacetime diagram form straightest possible lines. If spacetime is flat $$d\vec{x}/dt = const \Rightarrow \vec{x} = \vec{A}t + \vec{B}$$
(source: cornell.edu)
Now, suppose there is a finite universe with only one spacial dimension, whose ends are connected to form a circle. If we add also a time dimension, we get a cylindrical surface (time is in the vertical direction again), as on the next picture in the middle. If we also fill the space with some constant mass-density, the geometry of the space-time deforms (negative density corresponds to left image, positive to the right).
Suppose a particle starts on a point on the equator of the sphere, with a neighbouring particle near it. Their spacetime trajectories could be two neighbouring longitudal lines on the right picture. As we move up (time goes on), the distance between those two starts to contract, resulting in a fictious attractive force, even though they are both non-interacting. If we had chosen the negative density spacetime on the left image, the result would have been a repulsive force.
$Edit:$ All such illustrations are imprecise and have also some qualitative misleading features. For example, it seems possible for an accelerating particle to turn it's travel direction by $180^\circ$ (going back in time). However this is due to the fact that in this illustration we use locally Euclidean geometry, while in relativity we should use locally Minkowskian geometry. This unrealistic feature is present in (almost) every such visualization.
Another misleading feature of the example above is the smooth pole of the sphere. Actually, the conservation of mass-energy implies that as we move towards the poles, the density increases and so does the curvature. Thus the poles should be sharp tips, rather than being smooth. The lower pole would then stand for the Big Bang and the upper for the Big Crunch. Due to this, particles would not start travelling backwards in time, but rather end up in (and emerge from) a singularity. Again, it is impossible to remove this feature in Euclidean space, as this would imply at some moment the curvature and thus also density be smaller than in the equator (this is true even if the tip would be "directed" inside the sphere, as this would imply even negative Gaussian curvature at some point).