Does that mean the same as, " I like going to the dentist twice a year?" I think not. I read in a grammar book that we may use the gerund or infinitive + to after "like" with the same meaning.
In BE at least, there's a difference in meaning. I like to go means I think it's a good idea to go or I prefer to go. I like going means I enjoy going - unlikely if you're talking about the dentist's.