There is a file upload limit built in to PHP that you may need to change. Search Google for upload_max_filesize for information on how to change that setting.
For really large files, you will still get a timeout and you will either need to split up the files or upload the file to the server and use the mysqlimport shell command. Here's the command to upload a CSV file:
mysqlimport --fields-optionally-enclosed-by=""" --fields-terminated-by=, --lines-terminated-by="\r\n" --user=USERNAME --password=PASSWORD DATA_FILE.csv