You pass the geojson string directly to the ogr Open/gdalgdal OpenEx function.
In python it's just:
#gdal# 1.xGDAL 2+
ds = ogrgdal.OpenOpenEx('some geojson string')
or
#gdal
# 2GDAL 1.x11
ds = gdalogr.OpenExOpen('some geojson string')
An example to demonstrate:
from osgeo import gdal
geojson = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[146.7,-41.9]}}]}'
ds = gdal.OpenEx(geojson)
layer = ds.GetLayer()
feature = layer.GetFeature(0)
print(ds.GetDriver().ShortName)
print(feature.GetGeometryRef().ExportToWkt())
Output:
GeoJSON
POINT (146.7 -41.9)