The title says it (almost) all.
I have seen thins behavior many times where a stored procedure had a correct performance when executed from SSMS but ran poorly when executed from an application.
There can be many reasons. The ArithAbort setting can be one reason as shown in https://www.mssqltips.com/sqlservertip/4318/sql-server-stored-procedure-runs-fast-in-ssms-and-slow-in-application/. But there are many more reasons as explained in http://www.sommarskog.se/query-plan-mysteries.html