Yes, but only for one turn. Roost does not make a Pokemon lose its immunity forever, but just for that one turn. For example:
Turn 1: Pidgeot used Fly! Pidgeot flew up into the air! | Golurk used Earthquake! It missed!
Turn 2: Pidgeot used Fly! (Damage) | Golurk used Earthquake! It doesn't affect Pidgeot...
Turn 3: Pidgeot used Roost! | Golurk used Earthquake! (Damage)
Turn 4: Pidgeot used Return! (Damage) | Golurk used Earthquake! It doesn't affect Pidgeot...
In Turn 3, immunity was lost but it was regained in Turn 4. Roost only makes you lose the immunity for one turn (unless you are not a flying type or holding a Ring Target)