I was chaining for a shiny Ralts and then when it got 20 lv. higher than its normal lv. it reset back to 3 can this happen or did I break my chain somehow?
Nope. After a chain of over around 100 the levels automatically reset. You're chain should still be going ;)
Goodluck on the shiny ralts! Make sure you have taunt or something to stop it from using teleport ;)