I had this problem. Here is what I did to fix it...
On both devices, under the Message/iMessage settings, first ensure the same Apple ID is being used on both devices.
On your iPhone it will say "You can be reached for messgaes at: <your number>", and on the iPad it will say "You can be reached for messgaes at: <your Apple ID>".
I found taht so long as both were set using the same Apple ID and both had a common email address where messages could be recieved, it worked fine.
One other thing to note is that I had to delete an existing SMS thread on my iphone before the iMessage thread to the same contact would sync properly.
I hope this helps!