TITLE: Useful sufficient conditions for a topological space to be the underlying space of a topological group?
QUESTION [29 upvotes]: Here is a question that I have had in my head for a little while and was recently reminded of.

Let $X$ be a (nonempty!) topological space.  What are useful (or even nontrivial) sufficient conditions for $X$ to admit a group law compatible with its topology?

There are many necessary conditions: for instance $X$ must be completely regular.  In particular, if it is a Kolmogorov space it must be a Urysohn space.  It must be homogeneous in the sense that the self-homeomorphism group $\operatorname{Aut}(X)$ acts transitively.  In particular $\operatorname{Aut}(X)$ must act transitively on the connected components of $X$.  
It is rather clear though that these conditions are nowhere near sufficient even for very nice topological spaces.  A recent question on this site calls attention to this: even for the class of smooth manifolds there are a sequence of successively more intricate necessary conditions but (apparently) no good sufficient conditions.
What about for other classes of spaces?  Here are two examples: it suffices for $X$ to be discrete (i.e., every set is open) or indiscrete (i.e., only $\varnothing$ and $X$ are open).  These are, of course, completely trivial.  Can anyone do any better than this?  For instance:

If $X$ is totally disconnected and compact (for me this implies Hausdorff), must it admit the structure of a topological group?  

Added: as some have rightly pointed out, the above necessary condition of homogeneity is not implied by my assumptions.  So let us assume this as well.  Note that assuming second-countability as well forces the space to be (finite and discrete or) homeomorphic to the Cantor set, which is well-known to carry a topological group structure, so I don't want to assume that.

REPLY [11 votes]: In this short paper we have a counterexample for an even weaker statement (it admits no left topological group structure). There are also consistent examples (under CH) that are S-spaces etc. Note that any first countable compact zero-dimensional homogeneous space that is not metrisable is a counterexample, as a first countable topological group is metrisable.