Applying to Ph.D. with 5 years in Bachelors I will finish my 4 year bachelors program next year, in a total of 5 years.

I had failed many many courses in 2nd year and my cgpa was around 2.4

Then I had that enlightenment and decided to become an academic. Since then, I have increased my cgpa to over 3.5 and turned all F's to A's. For last 3 semesters I get averagely 3.9 gpa each semester

I still have some C's in few courses from 2nd year and instead of graduating this year, I will graduate next year.

I have managed to boost my cgpa amazingly after such things but I want to know if this extra year will cause me any trouble during Ph.D. applications.
This sort of thing should be explained in the cover letter. This trend is pretty common; freshmen enter college ready to party, realize halfway through that their grades are actually important, and then buckle down and do good work for the rest. You simply need to state that, despite your initial behavior, you are fully committed to your education. Given a 3.5 GPA at the end, I don't imagine you would have too much trouble.

Do note that this will vary as a function of the universities to which you apply; some may take a harsher view than others. Still, you have a good explanation for the one bad year, so it shouldn't post too much of a problem for you.