This is one of the use cases for ASIWebPageRequest.
If you want something lower level, you'll have to create an NSURLCredential instance and an NSURLProtectionSpace and save them to the credential store. At this point, the UIWebView should use the credential for all requests that match the protection space (which basically represents your site).
Here's some sample code, taken from here, which is not really where I'd expect to find it.
NSURLCredential *credential = [[NSURLCredential alloc]
initWithUser: @"userName"
password: @"password"
persistence: NSURLCredentialPersistenceForSession];
NSURLProtectionSpace *protectionSpace = [[NSURLProtectionSpace alloc]
initWithHost: @"www.mydomain.com"
port: 80
protocol: @"http"
realm: @"mydomain.com"
authenticationMethod: NSURLAuthenticationMethodDefault];
[[NSURLCredentialStorage sharedCredentialStorage]
setDefaultCredential: credential
forProtectionSpace: protectionSpace];
[credential release];
[protectionSpace release];