This problem is due to the fact that SharePoint only allows out of the box REST & CSOM endpoints consumption from Apps so if you deploy custom WCF services, it won't be allowed from within the App.
If you use sp.webrequestinfo cross-domain library, you'll notice that it will work providing your service is consumable anonymously.
Remember that in the context of a SharePoint-Hosted App, your only ways to consume web services are:
2. using an External Content Type but that only works for data services and I'm not sure that it works if your service requires authentication.
So, given the above, one way to achieve our goal is to use CORS but it will require some extra efforts before it works.
For complete details check: