Are there more general spaces than Euclidean spaces to have the Heine–Borel property?
Solution 1:
0) Note that in general a metric space has this property iff it is ball compact, i.e., closed balls of finite radius are compact.
Ball compact spaces are locally compact, but the converse does not hold: e.g. an infinite set endowed with the discrete metric $d(x,y) = \delta_{x,y}$ is locally compact, bounded and not compact, hence not ball compact.
1) A topological field is ball compact if and only if it is locally compact and not discrete. Thus the topological fields with this property are $\mathbb{R}$ and $\mathbb{C}$, $\mathbb{Q}_p$ and its finite extensions and $\mathbb{F}_q((t))$.
2) A finite product of ball compact metric spaces, endowed with (say) the product metric $d = \max_{i=1}^n d_i$ is ball compact.
Combining these, we find that any finite dimensional vector space over a nondiscrete locally compact field has this property. This directly generalizes the spaces $\mathbb{R}^n$ and there are branches of mathematics (number theory, representation theory, harmonic analysis) in which this generalization is very natural.
Solution 2:
You have to choose how you want to generalize the Heine-Borel property. There is no difficulty in generalizing "closed", because it already makes sense for any topological space, but "bounded" does not; it's specific to spaces with extra structure. So you have to choose how exactly you want to generalize that structure in interpreting the Heine-Borel property.
Since there are tempting generalizations of "bounded" where the Heine-Borel property need not hold (e.g. arbitrary metric spaces, with "$E$ is bounded" defined to mean something like "$E$ is contained in some ball of finite radius", need not have the Heine-Borel property), some care must taken in doing this.
One generalization is to work with complete metric spaces, and to replace the naive notion of boundedness just described with that of total boundedness. In this situation it is true that a subset $E$ of a complete metric space is compact if and only if it is closed and totally bounded. (If you want a Heine-Borel-type theorem for metric spaces that might not be complete, you can do this too--- at the cost of replacing "closed" with something relating to completeness. Wikipedia's page on this is informative; the details are also in most analysis books that discuss metric spaces in general. I'm not certain, but I think Rudin's Principles of Mathematical Analysis contains at least some of the details--- or maybe he sticks them in exercises.)
You can go slightly more general than metric spaces by considering uniform spaces (which have enough extra structure beyond just the topology to be able to talk about things like "uniform continuity", but do not necessarily have topologies induced by metrics). Total boundedness can be formulated for uniform spaces, too, and it's what you need (along with a technical condition related to completeness) to characterize compact sets in this situation.
Going in a slightly different direction, in functional analysis at least, it is quite common to have subsets of interest in infinite dimensional vector spaces that are simply not going to be compact or totally bounded in any natural structure that you want them to have these properties in, but you still want to exploit the idea of some kind of "boundedness". The generalized notion of a bornological space (roughly speaking, a topological space endowed with a collection of subsets that one regards as being "bounded") is occasionally useful in this connection, although I can't think of any nice Heine-Borel-type theorem at this level of generality.
Solution 3:
Nuclear Fréchet spaces have this property.
Solution 4:
A metric space such that the compact sets are exactly the closed and bounded ones is called "Borel compact" (by definition). A metric space is Borel compact iff it is cofinally complete and regularly bounded:
A sequence $(x_n)$ in a metric space is cofinally Cauchy iff for every $\epsilon > 0$ there exists some ball $B(x, \epsilon)$ that contains $x_n$ for infinitely many $n$. A metric space $(X,d)$ is cofinally complete iff every cofinally Cauchy sequence has a convergent subsequence (or equivalently, has a cluster point).
A space is regularly bounded iff every closed and bounded set is totally bounded.
Also, a metric space is Borel compact iff every bounded sequence has a convergent subsequence.