<p>Since content of web applications is dynamically generated it would appear that AdSense is not going to produce relevant ads.</p>

<p>Is there a way to increase relevancy of the AdSense ads for the web application?</p>

<p>Is it possible to achieve Gmail-like ad functionality at all for third-party applications?</p>

<p>Is there a better ad provider for web apps than Google?</p>

No, it's not really suitable. As you know, AdSense is based on page content and that's rarely going to target the correct ads unless your site is very focused on one advertising niche.
If you run a huge web-app that gets many millions of pageviews, then you might be able to get something worked out with Google privately. Otherwise, you're left to see what the best of the rest has to offer.
Chitika
does have the power to let you specify what niches you want to display adverts from... But their rates and even their quality of adverts aren't up there with Googles. Have a look around. There are thousands of advertising providers and I'm sure you'll find one that fits your model.
... But it's not Google at the moment.