Rather than trying to correct an error like this after it has already occurred (i.e., after stitching), IMHO, a better approach would be to adjust the brightness of the two images to match before stitching them together.
Also, to be honest the result you obtained does not look at all like what one usually gets when panoramic stitching is done correctly. Usually, there is no sharp boundary like in the image you posted -- the stitching software usually tries to do its best to get smooth out the transition. So, I suspect you did something wrong at this step, as well.
My suggestion would be for you to post the two (or more) component images in the forum, then we'll suggest a good way to proceed. If your camera saved the files in raw data format, e.g., *.nef, *.cr2, etc., post these. If they are only saved as JPGs, we'll attempt to work with them. If you took several exposures with the camera mounted on a tripod, post (or put on dropbox) all of the images. This will be especially important w.r.t. removing the banding from the sky and bringing out detail in the inky dark areas.
Cheers,
Tom M