When you do anything for the first time, it rarely succeeds. This applies to sex too. But unfortunately there are men and women out in society who judge a person based on his "actions".
If you and your partner are "steady" and want to be together, both of you need counseling. You must understand that sex is not like a handshake. It involves emotions and skills too.
When a first timer has sex, his fear of being caught, of pregnancy , STIs etc can run in his mind while having sex and this can kill erections. Even a barking dog in the neighborhood can affect a man, if he is distracted by it.
You need to have more experiences. It just doesn't mean that you are having some disease. Initial sex attempts are bound to be unfruitful. But one must not take it to heart and settle for some thing thats mutually agreeable, like cuddling, kissing, orals ex, etc, whatever you two decide and permit.
Masturbation doesnot harm sex. Infact many boys learn to delay ejaculation during masturbation and you must learn this. In many men, they need to run a parallel fantasy in their minds to maintain erections, while having sex.
Some youth loose erections because the partner opposite is notupto his "mark" as he is used to seeing too much porn where perfect bodies have sex.
Satisfaction for a female can be difficult to achieve. Many women do not know what an orgasm is. May be your partner is complaining about the "unfinished act"
If you are having morning erections on waking up from sleep, and are having erections otherwise, nothing is wrong with you. It is just novelty of the first experience and anxiety associated with it which caused your problem.
Next Steps
Relax, DO NOT rush to have sex to prove your "manhood". Be comfortable with her, have many NON penetrative sex experiences. Then with suitable time and place ( unrestricted ) try your sex. For further details of technique you may need to visit a sexologist. Google for one in your area or nearby Mumbai and get equipped with know how to have sex.