Hi,
On adding a web part if in a page at times it throws error and we need to access the page and remove that web part.
To do so we need to add the following querystring to the page url
http://localhost/Pages/Home.aspx?contents=1
It will open the page and will present the list of web parts in the page from wherein we can select and delete the web part that was causing the error.
Hope it helps..