Speaking at the annual National Prayer Breakfast, the leader used 2 Timothy as a starting point.
"For the Spirit God gave us does not make us timid, but gives us power, love and self-discipline," it says.
Obama said that so often fear inhibits people from making decisions and doing the right thing.
He said that his faith had helped him overcome the spirit of fear.
"Fear can lead us to lash out against those who are different or lead us to try to get some sinister 'other' under control.
"Alternatively, fear can lead us to succumb to despair or paralysis or cynicism.
"Fear can feed our most selfish impulses and erode the bonds of community."
But he added: "Faith is the great cure for fear."
The President also spoke about the release of Iranian-American pastor Saeed Abedini: "Last year, we prayed that he might be freed and this year we give thanks that he is home safe."
Chief Executive of Christian Solidarity Worldwide Mervyn Thomas was there and told Premier: "He got a very good reaction.
"The Christian right are probably not the best allies of the President but he got a standing ovation.
"He talked about having Jesus standing beside him and talked about the love of Jesus giving us the power to resist fears temptations.
"He said his faith in Jesus gave him the power to stand up for what's right, to stand against enemies, but also sometimes stand against friends".