Yes, it's possible in Magento, and you get the advantage of all the other platform capabilities, but you'll need to do a little work to make Magento work for you. To save a little sanity, I'm using the Magento terms for all of this below, so make sure to read Mike's (plentiful) links for more details on much of this.
To accomplish picking a city, you will need to use a combination of customer variables and session variables. Create a block and use it on the frontpage which will query the user for their city and stuff it into the session. If the user logs in, save that data to their customer profile, and pull any saved data out (so they don't have to choose every time).
To get the pricing accomplished is a little rougher. If you're using Enterprise Edition, the rich merchandising suite will allow you to create customer segments based on information such as the customer's address data. Use that to create customer segments and then create catalog price rules for the customers.
In community edition, you'll need to do a little more work. Hopefully, you have a reasonable number of cities to deal with. Create customer groups for each city and override the customer model to assign the customer to the proper group when they register (based on their city selection). Then, assign prices in the catalog based on the customer group using the tier pricing mechanism. This will allow you to give a price to each customer group as necessary, and define a default price if many of the cities are the same.
One of the issues here will be that managing a large price list is not something that Magento does natively, so nothing is really optimized to manage those price lists fluidly. If you have a relatively small number of cities or a relatively small catalog, this won't be an issue, but if either of those is very large, you may need to write a custom page to manage the price lists more easily.
Hope that helps!
Thanks,
Joe