If it is an open gap, it needs to be filled with an appropriate sealer, which could be a proprietary expanding filler, obtainable from DIY stores, which, after setting, can be trimmed back with a suitable knife, & painted over after curing.
davidj
September 2011