I see this analogy on the internet sometimes, and while poetic, it's flawed. First, electrons do not really orbit the nucleus of an atom. That is an old-fashioned way of saying it, and does not include what we call quantum mechanics. The Universe, on a very small scale, does not behave in ways that make much sense to us. A planet, on the other hand, can be at any distance from its star.
Electromagnetism can either attract or repel, but gravity can only attract.
That's a 1 followed by 40 zeros, or a ten thousand trillion trillion trillion times stronger, if I didn't drop a zero somewhere. So it would be nice to be able to make an Atomic Universe analogy, but as usual, Nature is more subtle than we can easily know.