One Complex Stored Procedure Causes Estimated Cost Exception
It sounds like you're running into query governor cost limits.  What's happening is that the database engine figures that your query will take 5822 seconds (97 minutes) to run.  Somebody, however, has configured a setting to kill any query which is expected to run more than 300 seconds (5 minutes).

To see if this applies to you, exec sp_configure 'query governor cost limit' and see what that run_value is.  My thought is that it's currently set to 300.

If you don't want to change the limit across the board, you should be able to run this query by setting the limit beforehand:  set query_governor_cost_limit 0.  That will adjust the particular session to turn off any cost limits, as you know that your query will blow past the limit and you don't much care.  Do note that you'd need some serious permissions to run that statement (the MSDN doc says sysadmin).