Hi Alex,
What type of loan did you apply for? Minimum scores will vary slightly from lender to lender, but guidelines and cutoffs are in 20 point increments (580, 600, 620, 640, etc.) Conventional loans usually start at 620, and FHA or other insured governments loans can go lower (as low as 580; and sometimes even lower than that).
If you checked your score through a credit card, or an online service, it will depend on which credit bureau they get their data from. For example, Capital One offers credit score tracking, and so do Discover Cards. One may partner with Transunion and another may use Experian or Equifax. Each bureau calculates your score a little differently, and not all accounts report to all three bureaus. Mortgage lenders will look at all three scores and take the middle of the three. If you have a 640, 619, and 615, your score for mortgage purposes will be 619 even if you have a 640 with one bureau.
You are so very close, and scores do fluctuate from month to month. Ask your lender if they can provide a "What if" scenario to see how you can raise your score a few points. Maybe you could pay off a high balance credit card, or take care of deleting any errors on your report (if there are any).
If you have a limited credit history, perhaps you could be added as a joint account holder on a family member's established account? For example, a relative has a credit card that has been open for 5 or 10 years, has never been late, and has a LOW or ZERO BALANCE. This is VERY IMPORTANT - You don't want to be added to a delinquent account or an account with a large balance that will add to your debt - it will hurt your debt to income ratio and you will then need more income to qualify for the same loan. If you can get another good account reporting on your credit, this could help raise your score. The person you ask doesn't necessarily have to give you a copy of the credit card to use, they will just need your social security number to add you to their account. Obviously, make sure this is a person who you really trust.
Just because you were denied this month, as soon as your score improves, you can re-apply. Your lender will obtain a new credit report with a (hopefully) higher score, and you should be able to refinance. Best of luck to you!