Based on your description, you will not be able to recover the original encrypted file.
Since you specify that you used a password and do not indicate the use of an IV, my assumption is that you did, in fact, use a passphrase rather than a secret key. When you encrypt a file with a passphrase, OpenSSL assumes that it is a low-entropy string unsuitable for use as a cryptographic key (which is assumed, for AES, to be a random 128-bit or 256-bit string). To turn the passphrase into a suitable key, it performs key stretching: a random salt is generated, and it is hashed together with the key a large number of times in order to increase the amount of effort needed for an attacker to guess the original input. The result is then used as the key.
Unfortunately, it is this random salt which prevents you from reencrypting back to the same file. If you had used a fixed key and IV (initialization vector), it would in general be possible for you to simply reencrypt the data with the two inputs you had mistakenly used, and recover the original encrypted file. However, since a random salt is used in the process to produce a key from a passphrase, and that random salt is stored in the file you decrypted, there will be no way to guess what that value was and therefore ensure you reencrypt with the same key and IV inputs.