A simpler setup is to use a diffuse node to mask the city lights. Not only does this work with unlimited lights and any scene you could need, but it uses a lot fewer nodes.
For my last earth project, I ended up just plugging the image (along with my specular setup) into the specular input. Setting the image to screen or additive, I could merely link my original specular shader nodes into the background colour, and send the result straight to the specular shader input. This has advantages over using luminosity, as the colours of the city lights will now correctly show through, as opposed to merely illuminating the colours from the diffuse shading. Using it along with your diffuse nodes would also work, so long as the "city lights at night" image is added to the end (er, right hand side) of the shader tree.
The gradient uses black keys over a white background, so the image opacity input can be controlled using the gradient alpha, leaving the gradient colour free for use in the diffuse setup (greatly simplifying the diffuse nodes!). Do note, however, that this doesn't overlap the dusk areas much; the city lights will of course be at 50% when the earth is 50% lit by the sun (or whatever other lights you have in the scene). Using separate gradients (still easily using the same diffuse node) would give greater control over the dusk area, and let you "turn on" your city lights before the earth is completely dark.
Yeah, it's not all that realistic. But it's cool, and it's how everyone wants to see their earth.

Just think of it as an outer space ND filter... films are always unrealistically darkening skies by using gradient filters, why not unrealistically darken the bright side of the earth, so both sun lit and city lights are visible? I'm sure if we were filming in outer space much, someone would try it. :thumbsup:
Hmmm, maybe it's not that unrealistic...