Several users suggested turning off IPv6; that wasn't the problem in my case; I was correctly getting a v6 IP from the router. Most suggested reinstalling the driver; obviously this wasn't the problem as it was able to connect and identify properly with the router. (Also, any solution involving "reinstallation" usually means the speaker doesn't know what the problem is. Ask someone else.)
The gateway and DNS were correctly configured; I learned this by doing an "ipconfig /all" on a Vista laptop (with Internet access) connected via wifi to the same router (A TP-Link with 4 ports and wifi), and comparing the DNS and gateway IPs with the MSI Windows 7 laptop. They had the same settings.
I tried diagnosing the connection by right-clicking on the adapter and clicking "Diagnose"; the application says that my DNS is not responding. Which is weird, because when I try pinging any website URL via command line, e.g. google.com, I get a response. (The DNS just resolves IPs to domain names. The fact that I can ping google.com and get a response from google's IP means the DNS works.)
By this time I was suspecting that it may be due to conflicts with a firewall/antivirus software. But this was a fresh install; no apps installed yet, and used only for browsing for 2 days.
What a difference those two days made. When I tried logging in via user Guest, I noticed that the WiFi icon on the taskbar now tells me I have internet access. I thought the problem was solved, so I downloaded avast!, tried installing it as Guest. The UAC prompt appeared asking me for an Administrator user and password. I inputted the details, and when the avast! installer tried downloading setup files, it couldn't access the internet! Applications in Guest can access the internet, but not the setup file run as Administrator!
I switched again to the Administrator account, and tried accessing the Internet to confirm this; again the problem appears.
At first I thought this was for security; maybe, just maybe, Windows 7 wouldn't let you surf the web as Administrator (which would make sense; it would be the equivalent of doing your everyday tasks in Linux as root). For the next step, I tried creating a new Administrator user. I logged in to that account, and voila, it was also able to connect to the net.
The original Admin account may have been corrupted; probably by malware. From the laptop's user surfing the net with it for 2 days unprotected. What a difference those two days can make.
I still haven't found the exact cause of the problem, though. For now, I created a new Administrator account and installed the latest avast! into it. Then I passworded the Administrator account, created a regular user account, and haven't heard complaints since.
Lesson learned? Do not connect to any network without antivirus/anti-malware software installed. End of story.



