I think you are getting a database timeout rather than an ASP.NET timeout, right? Off the top of my head I don't remember how to extend the SQL timeout - it might be a parameter you set in the connection string in web.config. But I'm not sure I recommend that, since that just means you have to wait longer for your search results.
First make sure you are on the latest version. I improved the search performance in 2.4.6.
Second, make sure you are using SQL Server. That is faster than SQLite (or SQL CE, if you are reading this after 2.5 is released).
Third, you can edit the stored procedure gs_SearchGallery to improve performance by not searching the table gs_MediaObjectMetadata. This table contains all the metadata extracted for media files and is typically several times larger than the album or media object tables, which takes a significant amount of time to search. That means, of course, that you won't be able to search on the metadata, but that might be acceptable in your case.
Alternatively, you can write a SQL script to delete records from the metadata table you don't care about. For example, if you don't need to search on f-stop, you can run this SQL:
DELETE FROM gs_MediaObjectMetadata
WHERE MetadataNameIdentifier=17
Or you can just not extract metadata in the first place by disabling that option on the metadata page in the site settings.
Hope this helps,
Roger Martin
Creator and Lead Developer of Gallery Server Pro