This "smart banner" appeared in iOS6, you can check, for example, this post or in the Apple documentation to learn how to create them.
Basically all you have to do is add the <meta> to your page in a specific format:
<meta name="apple-itunes-app" content="app-id=YOUR_APP_ID">
source share