Is it true that a set is compact iff it is closed, bounded, and has finite measure? I'm sure that this holds for $\mathbb{R}^n$ and for $L^p$ spaces.  Is it true in general?

No, it's not true in general. Consider the following topology on $\mathbb{N}$: A set is open if it's of the form $\{n, n + 1, \dots\}$. All open sets are compact and unbounded in this topology. Furthermore, if you equip this space with the counting measure, you'll have compact sets with infinite measure.
