Somewhere you'll have to store the connection key and your application must get into the db somehow.
You have to decide if you want to use db-rights (GRANTS and PERMITS) or if there is something like a master password for your application and you own rights management handled by your application. DB rights can lead to hardly solveable problems and often leads to something like: Sh$$, we cannot solve this tiny problem, let's grant all rights to make it work...
If your application does not deal with extremely sensible data you should prefer the masterpassword approach with an application driven rights system.
In one of our projects we have an XML-config file with passwords in an encrypted form. The user's input is compared against this configured passwords - and there are some more hurdles I don't want to speak about naturally.
Your idea with a special login-user with a very restricted access to read just the passwords table sounds good. Your idea with an internal function to check the password sounds good too.
Better than just return TRUE or FALSE would be a session token, which is the leading key for rights management, persistance of session data (current rows, window positions, whatever...). Such a token could be used in (web)services. It could have a timeout, you can bind auditing to it...
Good luck in finding the best and fitting solution! Rights management is very tricky and it is really worth to think about this before you start...