You'll need to improve your security practices before a new router is going to help you much. If you don't know how your router got hacked, start there. Check your router settings, especially ensure that it cannot be administered from the web side. Check that your router has WEP turned off completely, and that the router is set to WPA-2 PSK security at a minimum. Create a new, very long, secure password for accessing the router. Use a different long password for your WiFi - something your guests can easily enter into their iPhones, but long enough to thwart brute forcing. Make sure that any holes allowing outside traffic to come into your network through your router are using holes you intended to have in it.
If you have (or can borrow) a known clean client, perhaps an iPad, Chromebook, or iPhone, use that device to set and change your router's password instead of your PC. It's less likely to have key logging malware on it than your PC.
It's entirely possible the intruder pwn3d your PC, or a PC belonging to a family member or other legitimate user of your router, possibly through a corrupt web page, an email virus, or other piece of malware, and used your own PC to modify your router's firmware. UPnP enables easy discovering of appliances like routers - it's sure easy for the hacker or malware to use the same mechanism to attack your firewall. Make sure all your equipment on the "safe" side of your firewall is clean and free of viruses, Trojan horses, rootkits, keyloggers, etc. Once your PC is cleaned up, go back and change your router's passwords again.